Page 1 of 1

Not set up properly? Can't convert png to jpeg.

Posted: 2008-07-24T11:14:40-07:00
by cjshayward
I am running Gentoo and have had a problem that persists after re-emerging "imagemagick"; my USE="X bzip2 perl zlib -djvu -doc -fontconfig -fpx -graphviz -gs -hdri -jbig -jpeg -jpeg2k -lcms -nocxx -openexr -png -q32 -q8 -svg -tiff -truetype -wmf -xml".

convert will not turn a png into a jpeg:

jhayward@jhayward-desktop /tmp $ ls -l graph.png
-rw-r--r-- 1 jhayward jhayward 5659 Jul 24 11:31 graph.png
jhayward@jhayward-desktop /tmp $ convert graph.png graph.jpeg
convert: no decode delegate for this image format `graph.png'.
convert: missing an image filename `graph.jpeg'.

Any suggestions for what I need to configure/install/... so that I can run "convert foo.png foo.jpeg"?

Re: Not set up properly? Can't convert png to jpeg.

Posted: 2008-07-24T12:52:58-07:00
by fmw42
find out what IM thinks is installed using

convert -list configure

See the line for DELEGATES

Be sure it has jpeg, jpg2 and png.

Mine says:

DELEGATES bzlib fontconfig freetype gs jpeg jp2 lcms lqr openexr png tiff x11 xml zlib


Get any missing delegates from http://www.imagemagick.org/download/delegates/

Re: Not set up properly? Can't convert png to jpeg.

Posted: 2008-07-24T13:15:01-07:00
by cjshayward
fmw42 wrote:find out what IM thinks is installed using

convert -list configure

See the line for DELEGATES

Be sure it has jpeg, jpg2 and png.

Mine says:

DELEGATES bzlib fontconfig freetype gs jpeg jp2 lcms lqr openexr png tiff x11 xml zlib


Get any missing delegates from http://www.imagemagick.org/download/delegates/
I got:

DELEGATES bzlib x11 zlib

So I went to the URL you gave, downloaded libjpeg-6b.tar.bz2 and libpng-1.2.29.tar.bz2, and ran "./configure && make && make install".

Both of them appeared to run successfully, but my DELEGATES line was the same:

DELEGATES bzlib x11 zlib

Do I need to do something else to inform ImageMagick that libjpeg and libpng are available?

Re: Not set up properly? Can't convert png to jpeg.

Posted: 2008-07-25T10:33:16-07:00
by fmw42
I suspect that the installs did not work correctly. Look at the config.log to see if there are any errors.

Did you reinstall IM after installing the delegates? I think you need to do that. Then run convert -list configure and see what DELEGATES are installed.

Re: Not set up properly? Can't convert png to jpeg.

Posted: 2008-07-30T09:04:45-07:00
by cjshayward
fmw42 wrote:I suspect that the installs did not work correctly. Look at the config.log to see if there are any errors.

Did you reinstall IM after installing the delegates? I think you need to do that. Then run convert -list configure and see what DELEGATES are installed.
It seems to be working now, but the difference wasn't when I (re)installed the delegates, but when I re-emerged imagemagick specifying USE="... gif ... jpg ... png ..." in /etc/make.conf. (I think this may be the issue if this happens under Gentoo.)