问题
I've just installed a fresh copy of ImageMagick from source onto Snow Leopard 1.6.8 following these instructions minus the sudo ldconfig /usr/local/lib
command because that doesn't seem to exist on Mac.
Then I added this to my global bash file:
export LD_LIBRARY_PATH=$HOME/local/imagemagick/lib:$LD_LIBRARY_PATH
Now when I run which identify
I get:
/usr/local/bin/identify
And when I run the tests, GIF files remain GIF files:
Simpleton:Desktop pawel$ convert logo.gif logo.png
Simpleton:Desktop pawel$ file logo.png
logo.png: GIF image data, version 89a, 640 x 480
And when I want to convert a JPG file I get:
Simpleton:Desktop pawel$ convert clouds.jpg clouds.png
convert: no decode delegate for this image format `clouds.jpg' @ error/constitute.c/ReadImage/532.
convert: missing an image filename `clouds.png' @ error/convert.c/ConvertImageCommand/3016.
When I run identify -list format
then I can't see PNG or JPEG libraries. How do I add these without reinstalling ImageMagick?
回答1:
When I run identify -list format
I can see that the PNG and JPG delegate libraries are missing. I installed jpegsrc.v8c.tar.gz
from http://www.imagemagick.org/download/delegates/ and installed it using these instructions and reinstalled ImageMagick. I can now convert to JPG and still not to PNG so I'll obviously have to add that library.
来源:https://stackoverflow.com/questions/8488695/imagemagick-not-converting