简体   繁体   English

PHP Imagick - ImagickException(代码:420):此图像格式* .jpg没有解码委托

[英]PHP Imagick - ImagickException(code: 420): no decode delegate for this image format *.jpg

Yesterday I includes ondrejs PPA and installed PHP5, 5.6 and 7. Everything is working fine except the imagick functions. 昨天我包括ondrejs PPA并安装了PHP5,5.6和7.除了imagick功能外,一切正常。 The exact exception is: 确切的例外是:

request.CRITICAL: Uncaught PHP Exception ImagickException: "no decode delegate
for this image format `lorem.jpg' @ error/constitute.c/ReadImage/544" at 
ImageManager.php line 72

So I checked all installations and some stackoverflow questions but nothing seems to work. 所以我检查了所有安装和一些stackoverflow问题,但似乎没有任何工作。 Some more information. 更多信息。

convert -list configure output convert -list配置输出

DELEGATES     bzlib djvu fftw fontconfig freetype jbig jpeg jng jp2 lcms2 lqr lzma openexr pango png rsvg tiff x11 xml wmf zlib

but phpinfo() 但是phpinfo()

ImageMagick supported formats   no value

Any ideas? 有任何想法吗?

The solution in my case was, that ImageMagick and GraphicsMagick where both as PHP extension enabled. 在我的案例中的解决方案是ImageMagick和GraphicsMagick,其中两者都启用了PHP扩展。 I don't know why, but it seems something during the installation of the custom PPA went wrong or not at least not as expected. 我不知道为什么,但似乎在安装自定义PPA期间出现了问题,或者至少没有达到预期的效果。

Disabling the GraphicsMagick extension solved the problem and all supported formats where displayed within the php.ini correctly and all ImageMagick functions worked as expected. 禁用GraphicsMagick扩展解决了问题,并且所有支持的格式都正确地显示在php.ini中,并且所有ImageMagick函数都按预期工作。

Following this post, I've found a solution . 在这篇文章之后,我找到了一个解决方案 My need was for Perl module, not PHP (same error message). 我需要的是Perl模块,而不是PHP(相同的错误信息)。

Download what you need from here , configure and install, by default to /usr/local . 从这里下载所需内容,配置并安装,默认为/usr/local

Then you can recompile your imageMagick, with correct option, and the compilation process will now find dependencies. 然后,您可以使用正确的选项重新编译imageMagick,编译过程现在将找到依赖项。 (adding the path to the lib on you system is obviously not enough). (在你的系统上添加lib的路径显然是不够的)。

Pay attention to the installation path, in /usr/local by default (so you need to move probably your PHP compiled libs somewhere else, or change your path). 请注意默认情况下在/usr/local的安装路径(因此您需要将PHP编译的库移动到其他位置,或者更改路径)。

By the way, you will surely need to call the linker, surely what was wrong in your case: 顺便说一下,你肯定需要调用链接器,肯定是你的情况出了什么问题:

sudo ldconfig /usr/local/lib

暂无
暂无

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

相关问题 Imagick - 此图像格式没有解码委托 - Imagick - no decode delegate for this image format 在PHP iMagick中获取异常“对此图像格式无解码委托”,但不在ImageMagick上 - Getting exception 'no decode delegate for this image format' in PHP iMagick BUT NOT on ImageMagick PHP致命错误:未捕获异常'ImagickException',消息'此解码委托不适用于此图像格式 - PHP Fatal error: Uncaught exception 'ImagickException' with message 'no decode delegate for this image format Imagick SVG - 这种图像格式没有解码委托 - Imagick SVG - no decode delegate for this image format "Imagick SVG 到 JPG 错误没有解码委托" - Imagick SVG to JPG error no decode delegate imagickException:Postscript委托失败想象IIS - imagickException: Postscript delegate failed imagick IIS php5-imagick“没有解码委托”错误 - php5-imagick “no decode delegate” error 来自Imagick的readImageBlob函数抛出了一个错误,例如'No Decode Delegate for this Image Format' - readImageBlob function from Imagick is throwing an error like 'No Decode Delegate For This Image Format' OSX上的PHP-Imagick,ImagickException:NoDecodeDelegateForThisImageFormat`/my-path/file.jpg'@ error / constitute.c / ReadImage / 550 - PHP-Imagick on OSX, ImagickException: NoDecodeDelegateForThisImageFormat `/my-path/file.jpg' @ error/constitute.c/ReadImage/550 PHP代码将图像格式更改为JPG - PHP code to change image format to JPG
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM