Imagick处理PNG文件时抛出异常的问题求助
Imagick处理PNG文件时抛出异常的问题求助
大家好,我正在基于Imagick开发缩略图生成系统,目前JPG和WebP格式的图片都能正常生成缩略图,但处理PNG文件时总会抛出异常,错误信息如下:
"improper image header `/tmp/magick-fj49nThGt9uvW0CFbLJj7XGsqT7x30OC' @ error/png.c/ReadPNGImage/4107 => /var/www/html/Dullahan/thumbnail/Application/Generator/ImagickThumbnailGenerator.php => 89"
对应的调用栈信息:
[ { "file": "/var/www/html/Dullahan/thumbnail/Application/Generator/ImagickThumbnailGenerator.php", "line": 89, "function": "readImageFile", "class": "Imagick", "type": "->" }, { "file": "/var/www/html/Dullahan/thumbnail/Application/Generator/ImagickThumbnailGenerator.php", "line": 54, "function": "generateThumbnailFile", "class": "Dullahan\\Thumbnail\\Application\\Generator\\ImagickThumbnailGenerator", "type": "->" } ]
有没有大佬遇到过类似的问题?麻烦帮忙分析下可能的原因,比如是不是PNG文件本身的格式问题,还是Imagick的配置、版本存在什么坑?
备注:内容来源于stack exchange,提问作者Mortimer
相关产品推荐
相关产品推荐

