Struggling to install PNG delegate

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
gvanto
Posts: 2
Joined: 2016-03-14T20:51:58-07:00
Authentication code: 1151

Struggling to install PNG delegate

Post by gvanto »

Having a lot of trouble getting PNG delegate included during IM compilation:
http://askubuntu.com/questions/745660/i ... l-problems

Have spent many hours on this with no luck.

Help much appreciated,

thanks
gvanto
HairyDalek
Posts: 6
Joined: 2016-03-07T06:10:54-07:00
Authentication code: 1151

Re: Struggling to install PNG delegate

Post by HairyDalek »

HI,
I had similar problems the other week getting my Mac to do much the same. Even though I had the pnglib all compiled and ready to go, it wasn’t being built into ImageMagick. It seems that I had to add an extra command to achieve this:
export PKG_CONFIG_PATH=/Users/paul/Desktop/ImageMagick-6.9.3-7/png/
You probably need CPPFLAGS and LDFLAGS defined for the png library too.

I actually wrote a shell script to help me as there seemed to be a massively large number of steps to get where I wanted to be (a build of IM that I could take in a folder anywhere). This is what I have, and it‘s the result of a day long game of whack-a-mole I was playing to get things to work. It’s a combination of various suggestions and answers to similar problems I found, so it’s probably messy (this is well out of my comfort zone - I started this knowing nothing much about compiling software).

Code: Select all

#!/usr/bin/env bash
MYPATH=$PATH
export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
cd ~/Desktop
mkdir ImageMagick-Final
tar xvzf ImageMagick.tar.gz
cd ImageMagick-6.9.3-7
tar xvzf ~/Desktop/jpegsrc.v9a.tar.gz
mv jpeg-9a jpeg
tar xvzf ~/Desktop/libpng-1.6.21.tar.gz
mv libpng-1.6.21 png
cd png
./configure --disable-shared --disable-dependency-tracking --enable-static=no --prefix="/Users/paul/Desktop/ImageMagick-6.9.3-7/png" 
make clean;make
make install
cd ../jpeg
./configure --disable-shared --disable-dependency-tracking --enable-static=no  --prefix="/Users/paul/Desktop/ImageMagick-6.9.3-7/jpeg" 
make clean;make
make install
cd ../
export PKG_CONFIG_PATH=/Users/paul/Desktop/ImageMagick-6.9.3-7/png/

./configure --disable-installed --disable-shared --enable-delegate-build --disable-dependency-tracking --with-x=no --without-perl --with-freetype=no --with-magick-plus-plus=no --without-frozenpaths --with-bzlib=no --with-png=yes --with-jpeg=yes --prefix=/Users/paul/Desktop/ImageMagick-Final  LDFLAGS="-L/Users/paul/Desktop/ImageMagick-6.9.3-7/png" CPPFLAGS='-I/Users/paul/Desktop/ImageMagick-6.9.3-7/png' 

make clean;make
make install
echo ""
echo $PATH
export PATH=$MYPATH
echo ""
echo $PATH
Hopefully you can see what I am up to and use/amend to your needs.
gvanto
Posts: 2
Joined: 2016-03-14T20:51:58-07:00
Authentication code: 1151

Re: Struggling to install PNG delegate

Post by gvanto »

thanks HairyDalek!

andrew.46's response worked for me here: http://askubuntu.com/questions/745660/i ... l-problems
Post Reply