简体   繁体   English

在Windows Xampp上无法在ImageMagick上正常工作

[英]Unable to work on ImageMagick properly on Windows xampp

I read all the questions before posting this . 在发布此内容之前,我先阅读了所有问题。 I am trying to install ImageMagick on my local system Windows 7.It gets installed without But when i try using it to crop images I get NoDecodeDelegateForThisImageFormat . 我正在尝试在本地系统Windows 7上安装ImageMagick。它没有安装,但是当我尝试使用它裁剪图像时,我得到了NoDecodeDelegateForThisImageFormat。 I am running Apache/2.4.3 (Win32) OpenSSL/1.0.1c PHP/5.4.7 我正在运行Apache / 2.4.3(Win32)OpenSSL / 1.0.1c PHP / 5.4.7

This is what i did 这就是我所做的

  • I installed ImageMagick ImageMagick-6.8.9-8-Q16-x86-dll.exe (I tried 6.8.1 and 6.7 also) 我安装了ImageMagick ImageMagick-6.8.9-8-Q16-x86-dll.exe(我也尝试了6.8.1和6.7)
  • I got the dll from http://pecl.php.net/package/imagick/3.1.2/windows TS for PHP 5.4 我从http://pecl.php.net/package/imagick/3.1.2/windows TS中获得了DLL for PHP 5.4
  • Updated php.ini 更新了php.ini
  • The server started with out problem . 服务器启动时没有问题。
  • I checked via cmd the ImageMagick is working fine. 我通过cmd检查了ImageMagick是否工作正常。
  • phpinfo() ImageMagick number of supported formats: 0 phpinfo()ImageMagick支持的格式数目:0

I tried many DLL's but none is working i need a solution to this . 我尝试了许多DLL,但没有一个正在工作,我需要一个解决方案。

Also phpinfo keeps on showing ImageMagick version:ImageMagick 6.8.8-4 Q16 x86 2014-01-29 even when i uninstalled it / updated it . phpinfo还会继续显示ImageMagick版本:ImageMagick 6.8.8-4 Q16 x86 2014-01-29,即使我将其卸载/更新了。

identify -version 识别版本

Version: ImageMagick 6.8.9-8 Q16 x86 2014-08-26 http://www.imagemagick.org Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC Features: DPC Modules OpenMP Delegates: bzlib cairo freetype jbig jng jp2 jpeg lcms lqr pangocairo png ps rsv g tiff webp xml zlib 版本:ImageMagick 6.8.9-8 Q16 x86 2014-08-26 http://www.imagemagick.org版权所有:版权所有(C)1999-2014 ImageMagick Studio LLC功能:DPC模块OpenMP委托:bzlib cairo freetype jbig jng jp2 jpeg lcms lqr pangocairo png ps rsv g tiff webp xml zlib

I am trying to open Jpg. 我正在尝试打开Jpg。

ImageMagick inside php is a really different from the standalone cmd version. PHP中的ImageMagick与独立的cmd版本完全不同。

So, you need not only the php_imagic.dll connected to your php.ini . 因此,您不仅需要连接到php.iniphp_imagic.dll But also the CORE_RL_*_.dll files in the Apache bin directory. 还有Apache bin目录中的CORE_RL_*_.dll文件。 This will enable the readers. 这将使读者受益。 Now you need the ENcoders. 现在,您需要ENcoders。 These are obtained from the standalone installation and located in [ImageMagick install dir]\\modules\\coders . 这些是从独立安装获得的,位于[ImageMagick install dir]\\modules\\coders Copy them to Apache's bin directory as well. 将它们也复制到Apache的bin目录中。

Now check the phpinfo(); 现在检查phpinfo();

The downside of this is that you need to match dll's from Standalone version to the one that is Compiled in the php-extension. 这样做的缺点是您需要将dll的独立版本与php-extension中编译的版本相匹配。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM