ssxxjjii 发表于 2013-1-28 22:17:10

Linux下安装ImageMagick和Jmagick

环境为:centos 5.4 x64:


1、装LibPNG,安装后才能处理png格式图片


Shell代码
tar -xzvf libpng-1.4.3.tar.gz   
cd libpng-1.4.3   
./configure   
make   
make install


2、安装JPEG包,安装后才能处理JPEG格式图片


Shell代码
tar -xzvf jpegsrc.v8b.tar.gz   
cd jpeg-8b/   
./configure --enable-shared --enable-static   
make   
make install


3、安装Tiff包,安装后才能处理TIFF格式图片


Shell代码
tar -xzvf tiff-3.8.0.tar.gz   
cd tiff-3.8.0   
./configure   
make   
make install
4、安装jasper包,安装后才能处理JPEG2000格式图片


Shell代码
unzip jasper-1.900.1.zip   
cd jasper-1.900.1   
CFLAGS=-fPIC./configure   
make CFLAGS=-fPIC   
makeCFLAGS=-fPIC install
5、安装ImageMagick。


Shell代码
tar -xzvf ImageMagick-6.6.3-0.tar.gz   
cd ImageMagick-6.6.3-0   
./configure --prefix=/opt/ImageMagick-6.6.3-0--enable-share --enable-static--with-jpeg=yes--with-png=yes--with-tiff=yes --with-jp2=yes --without-perl   
make   
make install
6、配置环境


Shell代码
echo "/usr/local/lib" > /etc/ld.so.conf.d/usr-local-lib.conf      
ldconfig
7、安装Jmagick


Shell代码
PATH=$PATH:/usr/java/bin;export PATH   
/configure --with-magick-home=/opt/ImageMagick-6.6.3-0/ --with-java-home=/usr/java/   
make   
make install
8、测试


Shell代码
cd /opt/ImageMagick-6.6.3-0/bin   
./convert hehua.jpg –resize 50% hehua-resize.jpg
 
 
 
http://netbus.iteye.com/blog/711744
页: [1]
查看完整版本: Linux下安装ImageMagick和Jmagick