ImageMagick

Date Arrow  May 28, 2008

ImageMagick is a cool toolkit; not only it’s a complete set of command-line applications, ported to Windows, Mac and Linux, supporting hundreds of different image formats, it’s also a C++ library that you can use in your own applications!

On Mac OS X, I installed it via MacPorts using the all-time classic:

sudo port install ImageMagick

Then I created a C++ command-line application with Xcode, set the header and library paths in the target properties (/opt/local/include/ImageMagick and /opt/local/lib in this case) and I was ready to code. The API documentation and the tutorial give some hints, and using those examples I’ve cooked a quick image transformation utility to play with:

Interesting stuff indeed! The API provides a complete set of “Photoshop-like” operations on images, which I plan to study further in the near future.

Similar Posts:

Tagged   Code · Open Source

4 Comments

  • #1.   Yoan
    05.28.2008

    Why not using RMagick, PythonMagick instead of Magick++? Hey, it’s 2008! :-)

    Respect.

  • #2.   Adrian
    05.28.2008

    LOL Because sometimes you need to use C++ ;) Frankly, C++ rocks. Throw at it whatever you want, it’s a world of its own.

  • #3.   Narut
    03.01.2009

    Hi,

    I’m really interested in using this in iPhone development. Is that even possible?
    Am I able to convert Cocoa/Quartz object (ie. UIImage, CGImageRef) to ImageMagick object and vice versa?

    Thanks

  • #4.   Adrian
    03.01.2009

    Hi Narut,
    Thanks for your comment!
    I found this link which might be of interest to you regarding the port of ImageMagick to the iPhone / iPod Touch environment (it is from February 10th, 2008):
    http://tinyurl.com/imagemagickiphone
    And apparently it only covers jailbroken devices.

    However, you can’t simply convert one object to another just like that, in case you have the libraries installed and working. This just doesn’t work at all in general between libraries, unless there’s an explicit conversion method somewhere.

Commenting