Windows / PHP / ImageMagick / php_imagick: ‘no decode delegate for this image format’ or ‘ImageMagick number of supported formats: => 0’

After spending quite some time to install imagick for PHP under Windows, I’ve finally gotten a solution that work. Fetch the prebuilt binary files from pecl (select the newest one with a windows icon behind it), and download the version for your platform. If you’re not sure, you probably want Thread Safe (if running under Apache) and x86 (you can see which platform your PHP is compiled for at the top of the phpinfo() output).

After enabling the extension, you’ll probably get a few error message about missing DLLs. This is where it gets interesting – quite a few sources on the internet will tell you to install the ImageMagick distribution for Windows, but the current version of php_imagick uses a few deprecated functions in wand, etc. Previously the dll-s bundled with imagick in the same library could be copied into the installed version of imagick, but this doesn’t seem to work any longer.

However, hidden in a PHP bug report, there’s a path to a repository of dependencies for running php_imagick under Windows, which is the complete set of compiled dll files it expects. Download the correct version of ImageMagick (something like ImageMagick-6.8.8-…) and unpack it. I ended up copying everything from bin/ into my ImageMagick installation dir, but that’s .. rather overkill and will probably cause some mystery error in the future. Copy them to a separate location that you add to your path and test PHP from the command line. Hopefully you’ll see more supported image formats now!

7 thoughts on “Windows / PHP / ImageMagick / php_imagick: ‘no decode delegate for this image format’ or ‘ImageMagick number of supported formats: => 0’”

  1. Thank you very much for this. After a full day worth of searching for a solution this worked. Thank You!

  2. can any one please give me a step wise solutions for imagick installation

    I am getting this same error after installed imagick successfully

    Fatal error: Uncaught exception ‘ImagickException’ with message ‘NoDecodeDelegateForThisImageFormat `E:/Ampps/www/ecd-trunk/shared/user-images/816596958_124.JPG’ @ error/constitute.c/ReadImage/555′ in E:\Ampps\www\ecd-trunk\application\models\process_image_model.php:104 Stack trace: #0 E:\Ampps\www\ecd-trunk\application\models\process_image_model.php(104): Imagick->readimage(‘E:/Ampps/www/ec…’) #1 E:\Ampps\www\ecd-trunk\application\controllers\admin\process_image.php(107): Process_image_model->convert_object() #2 E:\Ampps\www\ecd-trunk\application\controllers\admin\process_image.php(102): Process_image->write_to_image(‘E:/Ampps/www/ec…’) #3 [internal function]: Process_image->optimize_image(‘processed’, ‘2067239’) #4 E:\Ampps\www\ecd-trunk\system\core\CodeIgniter.php(359): call_user_func_array(Array, Array) #5 E:\Ampps\www\ecd-trunk\index.php(197): require_once(‘E:\\Ampps\\www\\ec…’) #6 {main} thrown in E:\Ampps\www\ecd-trunk\application\models\process_image_model.php on line 104

  3. Thanks for link to dependences (idea). But still not OK. And then I copied all those *.dll to C:\Windows\System32 (win10) and then magick hapened. Before that, I expermetend with system enviroment variables and prety shure that I did it correct. But it wont, work. Software (apache, php ) ignored all those PATHES. C:\Windows\System32 was visible directory for soft.

Leave a Reply

Your email address will not be published. Required fields are marked *