Installing Image Science

ImageScience is a clean and happy Ruby library that generates thumbnails — and kicks the living crap out of RMagick. Oh, and it doesn’t leak memory like a sieve. :)

Installing ImageScience on CentOS 4/5


#install requirements
sudo yum install -y cvs gcc-c++

#login to the FreeImage CVS server
#when prompted for a password, hit enter
cvs -z3 -d:pserver:anonymous@freeimage.cvs.sourceforge.net:/cvsroot/freeimage login

#checkout FreeImage
#this will take a ridiculously long time, thanks to CVS
cvs -z3 -d:pserver:anonymous@freeimage.cvs.sourceforge.net:/cvsroot/freeimage co -D 2007-01-01  -P FreeImage
cd FreeImage

#compile FreeImage
make
PATH=$PATH:/sbin sudo make install

#install ImageScience gem
sudo gem install image_science

If you’re on a 64-bit OS (uname -i) you’ll need to checkout from 2007-02-11 instead of 2007-01-01 in the directions above. You might get these errors otherwise:


/usr/bin/ld: ./Source/FreeImage/BitmapAccess.o: relocation R_X86_64_32S against
`a local symbol' can not be used when making a shared object;
recompile with -fPIC

or


Source/Metadata/Exif.cpp:498: error: cast from 'BYTE*' to 'DWORD' loses precision
make[1]: *** [Source/Metadata/Exif.o] Error 1

Meta