ImageMagick No decode delegate for this image format

孤人 提交于 2019-12-04 05:41:14
Kalle Volkov

Seems that your ImageMagick PHP module does not support any image formats.

Try to find other ImageMagick installation or install PHP from the scratch.

Also - seems that there is already question/answer in SO about that

You should run

convert -version

and report the output. On my system it is

Version: ImageMagick 6.9.0-0 Q16 x86_64 2014-12-06 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC Modules
Delegates (built-in): bzlib cairo djvu fftw fontconfig freetype gslib gvc jbig \
                      jng jp2 jpeg lcms lqr ltdl lzma openexr pangocairo png ps \
                      rsvg tiff webp wmf x xml zlib

Does your output include png as one of the built-in 'delegates'?

If not, update your installation, or build from current sources.

Finally I found solution for my windows openserver/nginx/php-fpm installation:

  1. Download latest php_imagick distributive for your version of PHP from http://windows.php.net/downloads/pecl/releases/imagick/ (e.g. php_imagick-3.4.3-7.1-ts-vc14-x64.zip)
  2. Extract only php_imagick.dll from this archive to your "php/ext" folder.
  3. Run phpinfo() and check value at line "Imagick compiled with ImageMagick version" (mine was: "ImageMagick 6.9.3-7 Q16 x64 ...").
  4. Now go to http://windows.php.net/downloads/pecl/deps/ and download correct version of Imagick-*.zip file (mine was: ImageMagick-6.9.3-7-vc14-x64.zip).
  5. Extact this archive and copy all *.dll files from "/bin" folder to yout "php/ext" folder (about 145 files).
  6. Restart server and check phpinfo(). ImageMagick now supports about 230+ formats.

Sometimes phpinfo() displays that imagick supports all formats, but php scripts are not respond - in this case double check that you download correct version of Imagick-*.zip for your installations. (ts/nts, VC11/VC14, x64/x86)

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