How to install ImageMagick with Wampserver 3.0.0 64?

这一生的挚爱 提交于 2019-12-30 05:16:32

问题


I lost a day trying to figure this out, at various times getting "no decode delegate for this image format" and "The specified module could not be found" errors. The information I could find on these problems was dated in terms of version numbers, and many included instructions like overwriting the ImageMagick-installed dlls from the PECL distribution or copying dlls into windows/system32; two things I didn't want to do.

Environment: Windows 10
Wampserver: 3.0.0, Apache/2.4.17 (Win64) PHP/5.6.16


回答1:


  1. Downloaded and installed latest ImageMagick: ImageMagick-7.0.2-0-Q16-x64-dll.exe

  2. Downloaded php_imagick-3.4.3rc1-5.6-ts-vc11-x64 from http://windows.php.net/downloads/pecl/releases/imagick/3.4.3rc1/

  3. Unpacked php_imagick.dll into [wampserver directory]\bin\php\php5.6.16\ext

  4. Added extension=php_imagick.dll to [wampserver directory]\bin\apache\apache2.4.17\bin\php.ini

  5. Got "no decode delegate for this image format" error, but at least imagick showed up in phpinfo() where I could see that php_imagick.dll was compiled with ImageMagick 6.9.3-7 Q16 x64. There was no obvious way to know this beforehand.

  6. Downloaded ImageMagick-6.9.3-7-Q16-x64-dll.exe from http://ftp.icm.edu.pl/packages/ImageMagick/binaries/ (ImageMagick has removed this package from their site).

  7. Uninstalled ImageMagick-7.0.2-0-Q16-x64, installed ImageMagick-6.9.3-7-Q16-x64 to c:\ImageMagick, added c:\ImageMagick to PATH (in front, to avoid collision with windows convert.exe).

  8. Verified everything ok with:

    $image = new Imagick();
    $image->readImage([path to my jpeg]);
    
    $wm = new Imagick();
    $wm->readImage([path to my watermark png]);
    
    $image->compositeImage($wm, imagick::COMPOSITE_OVER, 5, 5);
    
    header("Content-Type: image/jpeg");
    echo $image;
    



回答2:


I have tried a lot of things. What has done the trick was to add at the end of active php.ini lines :

[ImageMagick]
extension="C:\WampDeveloper\Components\Php\ext\php_imagick\php_imagick.dll"
;imagick.locale_fix=0
;imagick.progress_monitor=0

Credit : http://www.devside.net/wamp-server/installing-and-using-imagemagick-with-imagick-php-extension-php_imagick-dll-on-wamp



来源:https://stackoverflow.com/questions/37927486/how-to-install-imagemagick-with-wampserver-3-0-0-64

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