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

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
cjshayward

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

Post 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"?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

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

Post 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/
cjshayward

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

Post 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?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

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

Post 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.
cjshayward

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

Post 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.)
Post Reply