[英]Imagick - no decode delegate for this image format
I am trying to convert PNGs to GIF using ImageMagick on my Ubuntu server.我正在尝试在我的 Ubuntu 服务器上使用 ImageMagick 将 PNG 转换为 GIF。 I used a PHP code to generate it however when I ran it, I received..
我使用 PHP 代码生成它,但是当我运行它时,我收到了..
PHP Fatal error: Uncaught exception 'ImagickException' with message 'no decode delegate for this image format
PHP 致命错误:未捕获异常“ImagickException”,消息为“此图像格式无解码委托”
Fatal error: Uncaught exception 'ImagickException' with message 'no decode delegate for this image format
致命错误:未捕获异常“ImagickException”,消息为“此图像格式无解码委托”
Then I used: convert -list configure
, on the libs, I didn't see either gif or png.然后我使用了:
convert -list configure
,在 libs 上,我没有看到 gif 或 png。 So I researched a bit more, and found that I should remove and re-install Imagick..所以我研究了一下,发现我应该删除并重新安装 Imagick ..
So I tried sudo apt-get remove imagemagick
, and then..所以我尝试
sudo apt-get remove imagemagick
,然后..
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.安装完成后,我使用
wget http://www.imagemagick.org/download/binaries/ImageMagick-x86_64-apple-darwin15.0.0.tar.gz
得到了最新版本。
But then, I got totally lost.但是后来,我完全迷路了。 I uncompressed it using
tar -xzf ImageMagick-x86_64-apple-darwin15.0.0.tar.gz
.我使用
tar -xzf ImageMagick-x86_64-apple-darwin15.0.0.tar.gz
解压缩了它。 I was expecting to find ./configure
in here, but I couldn't.我期待在这里找到
./configure
,但我找不到。
What am I missing or doing wrong?我错过了什么或做错了什么? Am I completely out of track?
我完全偏离轨道了吗?
You downloaded iOS binaries instead of sources.您下载的是 iOS 二进制文件而不是源代码。 You need sources if you want to compile them by hand:
如果您想手动编译它们,则需要源代码:
http://www.imagemagick.org/download/ImageMagick-6.9.3-0.tar.gz 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.使用此文件,您将能够使用您想要的任何图像格式编译 ImageMagick。
http://www.imagemagick.org/script/install-source.php 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
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.