Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Up to 6.8.9-10 everything works well though. The same compiled libpng is recognized. I tried libpng 1.6.18, 1.6.19 and 1.6.20, just didn't dare to check 1.7beta yet.
The configure shell code from 6.8.9-10/configure and 6.9.2-8/configure looks very different when checking for the PNG delegate library.
So my question: did I miss some important change for using libpng or is it just a local incident.
mkdir /tmp/install
cd libpng-1.6.19
./configure CFLAGS=-O3 --prefix=/tmp/install --enable-shared --disable-dependency-tracking
make check && make install
cd ../ImageMagick-6.9.2-8
./configure LDFLAGS=-L/tmp/install/lib CFLAGS=-O3 --prefix=/tmp/install --enable-shared --disable-dependency-tracking --with-png=yes
make check
PNG is a usable delegate for me with this procedure and IM 6.8.* but not with 6.9
Modern releases of ImageMagick uses libpng.pc to find and configure the PNG delegate library. Make sure libpng.pc is in your configure path. You can set a custom path with the PKG_CONFIG_PATH environment variable. If that fails, review config.log. It will tell you exactly why the PNG delegate failed to validate.
cat .profile
# MacPorts Installer addition on 2011-11-30_at_14:35:14: adding an appropriate PATH variable for use with MacPorts.
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
# Finished adapting your PATH environment variable for use with MacPorts.
export PATH="${PATH}:/Users/fred/Applications/ImageMagick-Scripts/bin:/Users/fred/Applications/ImageMagick-Scripts/bin/Instagrams"
export DISPLAY=:0
export GDFONTPATH=/Library/fonts/
export TMPDIR=/tmp
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/opt/local/lib/pkgconfig
After having "pkg-config" installed in my $PATH the problem went away. libpng was found and PNG is now a valid delegate! :)
But I also had to set PKG_CONFIG_PATH to /tmp/install/lib/pkgconfig to avoid the use of a local and outdated /opt/X11/lib/libpng15
PKG_CONFIG_LIBDIR is even more rigorous and useful to me.
BTW
> review config.log. It will tell you exactly why the PNG delegate failed to validate.
This is what I am told:
configure:30964: checking for PNG
configure:31023: result: no
configure:31033: result:
configure:31281: result: -------------------------------------------------------------
configure:31283: checking for TIFF
So perhaps it would help others if the messages report a possibly missing "pkg-config" tool.
After having the same issue, I wanted to give out some feedback.
When running configure, we have under "some influential environment variable" quite a few of ***_LIBS and ***_CFLAGS (even ***_PKG), but looking at the configure.ac and configure file, it looks like you are ignoring those value by setting them to an empty string.
Either I'm using the tools in a wrong way, or you shouldn't list the ***_LIBS and ***_CFLAGS under the influential environment variable.