GraphicsMagick 安装后不支持jpg及png格式图片的解决办法
2018-01-08 16:21
357 查看
1. 下载最新版GraphicsMagick-1.3.18
2. ./configure 后的结果
GraphicsMagick is
configured as follows. Please verify that this
configuration matches your expectations.
Host system type : x86_64-unknown-linux-gnu
Build system type : x86_64-unknown-linux-gnu
Option Configure option Configured value
-----------------------------------------------------------------
Shared libraries --enable-shared=no no
Static libraries --enable-static=yes yes
GNU ld --with-gnu-ld=yes yes
Quantum depth --with-quantum-depth=8 8
Delegate Configuration:
BZLIB --with-bzlib=yes no
DPS --with-dps=yes no
FlashPIX --with-fpx=no no
FreeType 2.0 --with-ttf=yes no
Ghostscript None gs (unknown)
Ghostscript fonts --with-gs-font-dir=default none
Ghostscript lib --with-gslib=no no
JBIG --with-jbig=yes no
JPEG v1 --with-jpeg=yes no (需安装 jpeg delegate library)
JPEG-2000 --with-jp2=yes no
LCMS --with-lcms=yes no
Magick++ --with-magick-plus-plus=yes yes
PERL --with-perl=no no
PNG --with-png=yes
no(需安装 png delegate library)
TIFF --with-tiff=yes no
TRIO --with-trio=yes no
Windows fonts --with-windows-font-dir= none
WMF --with-wmf=yes no
X11 --with-x= no
XML --with-xml=yes no
ZLIB --with-zlib=yes yes
make
sudo make install
3.Delegate Library安装
JPEG delegate library
> gm convert 470f1bb8c5a98.jpg -resize
100x100 out.jpg
gm convert: No decode delegate for this image format (470f1bb8c5a98.jpg).
官方建议:This exception indicates that an external delegate library or its headers were not available when ImageMagick was built. To add support for the image format, download and install the requisite delegate library and its header files and reconfigure,
rebuild, and reinstall ImageMagick. As an example, lets add support for the JPEG image format. First we install the JPEG RPMS:
原因是没有安装jpeg的包,这个可以在之前configure的结果中看出来,此时GraphicsMagick需要重新configure及build。
1)在GraphicsMagick官方网站提供的delegates下载页面中找到jpeg的包:libjpeg-6b.tar.gz。
2)安装jpeg delegate library. configure -> make -> sudo make install
3)重新安装GraphicsMagick (configure时会发现jpeg已安装)
PNG delegate library
gm convert: No decode delegate for this image format (ben3.png).
1)在GraphicsMagick官方网站提供的delegates下载页面下载libpng-1.6.2.tar.gz 。
2)安装png delegate library. configure -> make -> sudo make install
3)重新安装GraphicsMagick (configure时会发现png已安装)
注: 由于之前安装过一次libpng-1.5.2,rm /usr/local/lib/libpng*,在重新安装了1.4.7后,仍有错误:gm: error while loading shared libraries: libpng14.so.14: cannot open shared object file: No such file or directory.
运行sudo ldconfig进行自动清理。
特别说明:
如果系统之前已经下载安装了其他版本的libpng和jpeg,可以参考这篇文章在配置GM的时候去配置相关参数:Linux下编译安装GraphicsMagick及PHP扩展gmagick
2. ./configure 后的结果
GraphicsMagick is
configured as follows. Please verify that this
configuration matches your expectations.
Host system type : x86_64-unknown-linux-gnu
Build system type : x86_64-unknown-linux-gnu
Option Configure option Configured value
-----------------------------------------------------------------
Shared libraries --enable-shared=no no
Static libraries --enable-static=yes yes
GNU ld --with-gnu-ld=yes yes
Quantum depth --with-quantum-depth=8 8
Delegate Configuration:
BZLIB --with-bzlib=yes no
DPS --with-dps=yes no
FlashPIX --with-fpx=no no
FreeType 2.0 --with-ttf=yes no
Ghostscript None gs (unknown)
Ghostscript fonts --with-gs-font-dir=default none
Ghostscript lib --with-gslib=no no
JBIG --with-jbig=yes no
JPEG v1 --with-jpeg=yes no (需安装 jpeg delegate library)
JPEG-2000 --with-jp2=yes no
LCMS --with-lcms=yes no
Magick++ --with-magick-plus-plus=yes yes
PERL --with-perl=no no
PNG --with-png=yes
no(需安装 png delegate library)
TIFF --with-tiff=yes no
TRIO --with-trio=yes no
Windows fonts --with-windows-font-dir= none
WMF --with-wmf=yes no
X11 --with-x= no
XML --with-xml=yes no
ZLIB --with-zlib=yes yes
make
sudo make install
3.Delegate Library安装
JPEG delegate library
> gm convert 470f1bb8c5a98.jpg -resize
100x100 out.jpg
gm convert: No decode delegate for this image format (470f1bb8c5a98.jpg).
官方建议:This exception indicates that an external delegate library or its headers were not available when ImageMagick was built. To add support for the image format, download and install the requisite delegate library and its header files and reconfigure,
rebuild, and reinstall ImageMagick. As an example, lets add support for the JPEG image format. First we install the JPEG RPMS:
原因是没有安装jpeg的包,这个可以在之前configure的结果中看出来,此时GraphicsMagick需要重新configure及build。
1)在GraphicsMagick官方网站提供的delegates下载页面中找到jpeg的包:libjpeg-6b.tar.gz。
2)安装jpeg delegate library. configure -> make -> sudo make install
3)重新安装GraphicsMagick (configure时会发现jpeg已安装)
PNG delegate library
gm convert: No decode delegate for this image format (ben3.png).
1)在GraphicsMagick官方网站提供的delegates下载页面下载libpng-1.6.2.tar.gz 。
2)安装png delegate library. configure -> make -> sudo make install
3)重新安装GraphicsMagick (configure时会发现png已安装)
注: 由于之前安装过一次libpng-1.5.2,rm /usr/local/lib/libpng*,在重新安装了1.4.7后,仍有错误:gm: error while loading shared libraries: libpng14.so.14: cannot open shared object file: No such file or directory.
运行sudo ldconfig进行自动清理。
特别说明:
如果系统之前已经下载安装了其他版本的libpng和jpeg,可以参考这篇文章在配置GM的时候去配置相关参数:Linux下编译安装GraphicsMagick及PHP扩展gmagick
相关文章推荐
- GraphicsMagick 安装后不支持jpg及png格式图片的解决办法
- GraphicsMagick 安装后不支持jpg及png格式图片的解决办法
- GraphicsMagick 安装后不支持jpg格式图片的解决办法
- 使VirtualBox支持安装64位系统的解决办法
- 使VirtualBox支持安装64位系统的解决办法
- jpg图片在IE6、IE7和IE8下不显示解决办法
- PHP安装环境,服务器不支持curl_exec的解决办法
- 安装GD后不支持PNG或JPG的修复办法
- 64位操作系统安装asp.net2.0框架不支持解决办法
- PHP安装环境,服务器不支持curl_exec的解决办法
- 用VS2005打开一个.NET2.0方案,里面有几个工程和一个网站,提示网站的项目.csproj文件无法打开:“此安装不支持该项目类型”,的解决办法。
- 使VirtualBox支持安装64位系统的解决办法
- 使VirtualBox支持安装64位系统的解决办法
- 安装GD后不支持PNG或JPG的修复办法
- Atitit.jpg png格式差别以及解决jpg图片不显示的问题
- 安装Exchange 2007时误选"是否支持outlook 2003以前版本时"的解决办法
- 解决eWebEditor上传图片提示:请选择一个有效的文件,支持的格式有(GIF|JPG|JPEG|BMP|PNG)!
- 使VirtualBox支持安装64位系统的解决办法
- 使VirtualBox支持安装64位系统的解决办法
- ecshop在linux下安装出现"GD版本 不支持"情况的解决办法