我正在尝试在我的 Ubuntu 14.04 机器上使用 PHP 将 PSD 转换为 PNG 文件。
但是我收到此错误:
"
Fatal error: Uncaught exception 'ImagickException' with message 'no decode delegate for this image format "Abstract origami speech bubble.psd" @ error/constitute.c/ReadImage/544' in....
"
这是"convert -version
"输出:
Version: ImageMagick 6.9.0-0 Q16 x86_64 2014-12-14 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC OpenMP
Delegates (built-in): bzlib djvu fontconfig freetype jbig jng jpeg lcms lqr '
lzma openexr png tiff x xml zlib
要读取或写入PSD文件,您的ImageMagick需要一个名为PSD的内置模块。在我的系统上,这是由文件psd.so
提供的:
kp@mbp:> cd /opt/local/lib/ImageMagick-6.9.0/modules-Q16/coders
kp@mbp:> ls -l psd.so
-rwxr-xr-x 1 root admin 59260 Dec 6 04:11 psd.so
您应该运行以下命令以查看您是否支持 PSD 文件:
convert -list format | grep -E '(PSD|Modul|----)'
对我来说,它返回这些行:
Format Module Mode Description
-----------------------------------------------------------------
PSB* PSD rw+ Adobe Large Document Format
PSD* PSD rw+ Adobe Photoshop bitmap
如果您没有安装 PSD 模块,则无法读取或写入 PSD 文件...