About Me

My photo
PhD Candidate at Purdue University, Computer Science.

Sunday, January 27, 2008

ImageMagick: Installation on MAC ( Third Shot)

After I installed ImageMagick on my MAC. I couldn't run the mogrify commands to resize my JPG image.
the error i got was..
No decode delegate for image format
So, I tried to rename my file to gif and test but i got the same error again. I thought that my installation was not able to find the module responsible of decoding different formats.
I couldn't find any solution to the problem, but i figured out that I was wrong about renaming the file. this was not enough as a work around.

I reinstalled the imageMagick another time but with some more complex steps this time. this time I will add the PNG support to my installation.

  1. Install Fink.
  2. Add /sw/bin is in your path. (on the root vi .bash_login)
  3. add symbolic link: cd /Developer/SDKs/MacOSX10.4u.sdk
    ln -s sw /sw
  4. Download the libpng lib. Make sure to read the INSTALL file of the downloaded folder. It will guide you to install the zlib as well.
  5. Make sure the files are included in your include folder . in /usr/local/include. The files you'll be looking for are named "png.h"
  6. gunzip -c ImageMagick.tar.gz | tar xvf -
  7. cd ImageMagick-3.8
  8. ./configure --prefix=/sw --with-quantum-depth=16 \
    --disable-dependency-tracking --with-x=yes \
    --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib/ \
    --without-perl --with-png=yes
  9. read the console and make sure that the PNG format was supported successfully.
  10. make
  11. sudo make install
  12. In case you need to check a list of supported format from of the ImageMagick run the following command $convert -list format.
  13. you can apply this for all formats you need (jpeg, tiff...etc). the ImageMagick doesn't support all formats by default.

No comments: