Imagick - no decode delegate for this image format

北战南征 提交于 2019-12-23 04:45:21

问题


I am trying to convert PNGs to GIF using ImageMagick on my Ubuntu server. I used a PHP code to generate it however when I ran it, I received..

PHP Fatal error: Uncaught exception 'ImagickException' with message 'no decode delegate for this image format

Fatal error: Uncaught exception 'ImagickException' with message 'no decode delegate for this image format

Then I used: convert -list configure, on the libs, I didn't see either gif or png. So I researched a bit more, and found that I should remove and re-install Imagick..

So I tried sudo apt-get remove imagemagick, and then..

sudo apt-get install libperl-dev gcc libjpeg-dev libbz2-dev libtiff4-dev libwmf-dev libz-dev libpng12-dev libx11-dev libxt-dev libxext-dev libxml2-dev libfreetype6-dev liblcms1-dev libexif-dev perl libjasper-dev libltdl3-dev graphviz pkg-config

After it completed installing, I used wget http://www.imagemagick.org/download/binaries/ImageMagick-x86_64-apple-darwin15.0.0.tar.gz and got the latest version.

But then, I got totally lost. I uncompressed it using tar -xzf ImageMagick-x86_64-apple-darwin15.0.0.tar.gz. I was expecting to find ./configure in here, but I couldn't.

What am I missing or doing wrong? Am I completely out of track?


回答1:


You downloaded iOS binaries instead of sources. You need sources if you want to compile them by hand:

http://www.imagemagick.org/download/ImageMagick-6.9.3-0.tar.gz

With this file you will be able to compile ImageMagick with whatever image formats you want.

http://www.imagemagick.org/script/install-source.php

Edit: Step-by-step instructions

wget http://www.imagemagick.org/download/ImageMagick-6.9.3-0.tar.gz
tar xvzf ImageMagick-6.9.3-0.tar.gz
cd ImageMagick-6.9.3-0
./configure

Make sure that the output of the previous command shows this:

PNG               --with-png=yes        yes

And then:

make
sudo make install
sudo ldconfig /usr/local/lib


来源:https://stackoverflow.com/questions/34623741/imagick-no-decode-delegate-for-this-image-format

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!