日期:2014-05-16  浏览次数:20575 次

jmagick 软件、安装说明(window和linux两个版本)

java JDK安装这里就不在说了。
???? ImageMagick 是一个功能很强的图片处理程序。可应用在多种操作系统平台上。
使用过程如下:
1.下载了ImageMagick-6.4.0-0.tar.gz和jmagick-6.4.0.tar.gz压缩包。
?注意下载包必须包含图1和图2的内容。有下载的文件不全只包含了两个so文件和两个jar文件。
?在某些情况下可以使用。但是我的linux 是64位的。网上没找到编译好的64位so文件和jar文件。
2.安装环境要求:
?如果安装了老版本ImageMagick的包,一定要先删除 yum remove ImageMagick
?确认已经安装了zlib、freetype、libpng和jpeg-6b等lib的开发包,可以用rpm -aq查询,如果没有的请先安装。
?观察配置后给出来的支持图形格式,看看该图形格式支持是否是yes,如果不是,那么必须先安装该图形格式的本地库。
?例如,应该检查的rpm包:libpng libpng-devel libjpeg gd-devel libtiff。
?我是通过网络来下载所需要的包,其他包根据实际情况安装。
?例如:(安装缺少的libX11包)
?

[root@localhost ImageMagick-6.4.0]# yum list | grep libX11
	libX11.i386                                1.0.3-9.el5                 installed
	libX11.x86_64                              1.0.3-9.el5                 installed
	libX11.i386                                1.0.3-11.el5                base     
	libX11.x86_64                              1.0.3-11.el5                base     
	libX11-devel.i386                          1.0.3-11.el5                base     
	libX11-devel.x86_64                        1.0.3-11.el5                base     
	[root@localhost ImageMagick-6.4.0]# yum install libX11-devel

?

3.安装ImageMagick包
?tar xzvf ImageMagick-6.5.3-2.tar.gz
?./configure --prefix=/opt/ImageMagick --enable-share --enable-static
?make
?make install
?编译时如果发生如下异常请安装X11包。安装方法如上。
?./magick/xwindow-private.h:27:21: error: X11/Xos.h: No such file or directory

?安装完后使用convert logo: logo.gif 命令看看生成的文件是否正确。
?特别说明,要分别测试你所需要的不同的图片类型,如png,gif,jpg等等。
?如果出现no decode delegate for this image format `PG_script/533589.tif’
?这样的错误请,
?使用identify -list format 命令查看列表中是否有支持的图片类型?

[root@localhost logs]# identify -list format
	   Format  Module    Mode  Description
	-------------------------------------------
		A* RAW       rw+   Raw alpha samples
	       AI  PDF       rw-   Adobe Illustrator CS2
	      ART* ART       rw-   PFS: 1st Publisher Clip Art
	      ARW  DNG       r--   Sony Alpha Raw Image Format
	      AVI* AVI       r--   Microsoft Audio/Visual Interleaved
	      AVS* AVS       rw+   AVS X image
		B* RAW       rw+   Raw blue samples
	      BMP* BMP       rw-   Microsoft Windows bitmap image
	     BMP2* BMP       -w-   Microsoft Windows bitmap image v2
	     BMP3* BMP       -w-   Microsoft Windows bitmap image v3
	      BRF* BRAILLE   -w-   BRF ASCII Braille format
		C* RAW       rw+   Raw cyan samples
	  CAPTION* CAPTION   r--   Image caption
	      CIN* CIN       rw+   Cineon Image File
	      CIP* CIP       -w-   Cisco IP phone image format
	     CLIP* CLIP      -w+   Image Clip Mask
	     CMYK* CMYK      rw+   Raw cyan, magenta, yellow, and black samples
	    CMYKA* CMYK      rw+   Raw cyan, magenta, yellow, black, and opacity samples
	      CR2  DNG       r--   Canon Digital Camera Raw Image Format
	      CRW  DNG       r--   Canon Digital Camera Raw Image Format
	      CUR* CUR       rw-   Microsoft icon
	      CUT* CUT       r--   DR Halo
	      DCM* DCM       r--   Digital Imaging and Communications in Medicine image
		   DICOM is used by the medical community for images like X-rays.  The
		   specification, "Digital Imaging and Communications in Medicine
		   (DICOM)", is available at http://medical.nema.org/.  In particular,
		   see part 5 which describes the image encoding (RLE, JPEG, JPEG-LS),
		   and supplement 61 which adds JPEG-2000 encoding.
	      DCR  DNG       r--   Kodak Digital Camera Raw Image File
	      DCX* PCX       rw+   ZSoft IBM PC multi-page Paintbrush
	      DDS* DDS       r--   Microsoft DirectDraw Surface
	    DFONT* TTF       r--   Multi-face font package (Freetype 2.2.1)
	      DNG  DNG       r--   Digital Negative
	      DOT  DOT       ---   Graphviz
	      DPS  DPS       ---   Display Postscript Interpreter
	      DPX* DPX       rw+   SMPTE 268M-2003 (DPX 2.0)
		   Digital Moving Pi