shiningthrough

Install ImageScience on OS X Leopard

15 February 2009

I couldn’t find a tutorial that took me through this process successfully, in the end I combined information from several other articles to provide these simple steps.

Prerequisites

I used a clean fresh Install of Leopard to begin with.

Make sure you have installed Xcode from the Leopard disk.

Install ruby_inline

Open a terminal, and enter:

sudo gem install RubyInline

Install FreeImage

Download FreeImage (http://freeimage.sourceforge.net/download.html)

Using your editor of choice (I am using Vi), edit Makefile.osx

vi ~/Downloads/FreeImage/Makefile.osx

to make sure that the following lines read as: (correct for FreeImage 3.11.0)

INCLUDE_PPC = -isysroot /Developer/SDKs/MacOSX10.5.sdk
INCLUDE_I386 = -isysroot /Developer/SDKs/MacOSX10.5.sdk
...
LIBRARIES_PPC = -Wl,-syslibroot /Developer/SDKs/MacOSX10.5.sdk
LIBRARIES_I386 = -Wl,-syslibroot /Developer/SDKs/MacOSX10.5.sdk

then, in a terminal:

cd FreeImage
make
sudo make install

Install ImageScience

sudo gem install image_science

Test it all worked

irb
require 'image_science'

It will return true if you have been successful.

With thanks to

http://www.ruby-forum.com/topic/141754
http://resettodefault.com/2007/11/05/imagescience_on_leopard
http://seattlerb.rubyforge.org/ImageScience.html

Comments