Transferred from: http://blog.csdn.net/fhqsse220/article/details/12995763
GraphicsMagick Installation
Download software: download:ftp://ftp.graphicsmagick.org/pub/graphicsmagick/1.3/graphicsmagick-1.3.18.tar.gz
#如果需要支持JPEG则需要执行这一步, recommend implementation. (JPEG v1--with-jpeg=yes Yes)
Yum install-y libjpeg-devel Libjpeg
Install the Software:
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
This can also be done by default./configure just fine.
Make
Make install
Now that the installation is complete, you can test and see.
############################ #下面是./configure after the return of information, if you need something to add it here I need these on the OK. ##########################
GraphicsMagick is configured as follows. Please verify the 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 &nbsP /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
#############################################################################################
Test:
GM Convert 111.jpg 222.png
GM Convert 111.jpg-resize 100x100 out.jpg
If error:
1 if Configure prompts "Configure:error:libltdl is required for modules build" Yum Install Tdl-devel