how to install ImageMagick with PNG

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
alpheus

how to install ImageMagick with PNG

Post by alpheus »

Hi,

I'm new to ImageMagick and I've been trying to install it on CentOS via the ./configure , make procedure. But during make I always get

Code: Select all

coders/png.c: In function WriteOnePNGImage:
coders/png.c:6650: error: PNG_COLOR_TYPE_RGBA undeclared
I don't know if i'm doing anything wrong. Any assistance is greatly appreciated.

Thanks!
Jun
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: how to install ImageMagick with PNG

Post by fmw42 »

I don't know much about Linux or CentOS, I am on a Mac. But this works for me.

install the png (and any other delegate libraries) first, then recompile IM.

see
http://www.imagemagick.org/download/delegates/

but you might want to search the web for more current versions
alpheus

Re: how to install ImageMagick with PNG

Post by alpheus »

Hi fmw42,

Thanks for directing me to the delegates. I've fixed the problem but I wasn't entirely sure where I hit it. Here's what I did.
  • 1. removed libpng-devel
    2. installed libpng-devel
    3. downloaded and extracted ImageMagick zip file into a folder
    4. ran ./configure --without-png
    (i did this just to test if the error i received during make was indeed from the png library)
    5. ran make
    (this time there were no errors)
    6. ran ./configure
    (this time with options / parameters)
    7. ran make
    (again, the errors on the png were gone)
    8. ran make install
Imagemagick installed successully afterwhich, I installed imagick for php after and checked phpinfo(). Imagick is installed and ImageMagick supported formats now include PNG.

I guess the problem lied with the libpng-devel. It may have been a faulty installation.

Thanks!

Jun
Post Reply