linux+GraphicsMagick 安装
转摘自:http://blog.csdn.net/fhqsse220/article/details/12995763
GraphicsMagick 安装
下载软件:download:ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/1.3/GraphicsMagick-1.3.18.tar.gz
#如果需要支持JPEG则需要执行这一步,建议执行。(JPEG v1 --with-jpeg=yes yes )
yum install -y libjpeg-devel libjpeg
安装软件:
tar xf GraphicsMagick-1.3.18.tar.gz
cd GraphicsMagick-1.3.18
./configure --prefix=/usr/local/GraphicsMagick-1.3.18 --with-quantum-depth=8 --enable-shared --enable-static
此处也可以默认 ./configure 就好
make
make install
至此 安装完毕,可以测试看看了。
#############################下面是 ./configure 后的返回信息,如果需要什么在自己补充吧这里我就需要这些就ok了。##########################
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 Modules --with-modules=no no
Delegate Configuration: BZLIB --with-bzlib=yes yes DPS --with-dps=yes no FlashPIX --with-fpx=no no FreeType 2.0 --with-ttf=yes yes Ghostscript None gs (8.15.2) Ghostscript fonts --with-gs-font-dir=default /usr/share/fonts/default/Type1/ Ghostscript lib --with-gslib=no no JBIG --with-jbig=yes no JPEG v1 --with-jpeg=yes yes JPEG-2000 --with-jp2=yes no LCMS v1 --with-lcms=yes no LCMS v2 --with-lcms2=yes no LZMA --with-lzma=yes no Magick++ --with-magick-plus-plus=yes yes PERL --with-perl=no no PNG --with-png=yes yes (-lpng12) 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= yes XML --with-xml=yes yes ZLIB --with-zlib=yes yes
X11 Configuration: X_CFLAGS = X_PRE_LIBS = X_LIBS = X_EXTRA_LIBS =
Options used to compile and link: CC = gcc -std=gnu99 CFLAGS = -fopenmp -g -O2 -Wall -pthread CPPFLAGS = -I/usr/include/freetype2 -I/usr/include/libxml2 CXX = g++ CXXFLAGS = -pthread DEFS = -DHAVE_CONFIG_H LDFLAGS = -L/usr/lib -L/usr/lib LIBS = -lfreetype -ljpeg -lpng12 -lXext -lX11 -lbz2 -lxml2 -lz -lm -lgomp -lpthread
#############################################################################################
测试:
gm convert 111.jpg 222.png
gm convert 111.jpg -resize 100x100 out.jpg
如果报错:
1)如果configure提示“configure: error: libltdl is required for modules build”,则yum install libtool-ltdl libtool-ltdl-devel