开发者社区> club111> 正文
阿里云
为了无法计算的价值
打开APP
阿里云APP内打开

ImageMagic+Jmagick部署

简介: #------------------------------------------# #  create by 开源人 #  modify by bdkyr #  2012-8-19 #-------------------------------------------...
+关注继续查看
#------------------------------------------#
#  create by 开源人
#  modify by bdkyr
#  2012-8-19
#-------------------------------------------#
一、安装支持库和JDK
      yum install libpng libpng-devel libjpeg libjpeg-devel gd gd-devel libtiff libtiff-devel -y

    #安装JDK
    wget http://www.reucon.com/cdn/java/jdk-7u55-linux-x64.tar.gz
    cp -R jdk1.7.0_55  /application/
    ln -s /application/jdk1.7.0_55   /application/jdk
    vim /etc/profile
    export JAVA_HOME=/application/jdk
    export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib
    export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH:$HOMR/bin
    export RESIN_HOME=/application/resin
    #使配置生效
    source /etc/profile
二、安装ImageMagick和jmagick
2.1 下载ImageMagick-6.4.0-0.tar.gz
     wget http://downloads.jmagick.org/6.4.0/ImageMagick-6.4.0-0.tar.gz
     tar zvxf ImageMagick-6.4.0-0.tar.gz
     cd ImageMagick-6.4.0
     ./configure --prefix=/application/imagemagick-6.4.0
     make
     make install
     cd ../

2.2验证configuration情况:
[root@test ImageMagick-6.4.0]# /application/imagemagick-6.4.0/bin/identify -list configure

Path: /application/imagemagick-6.4.0/lib/ImageMagick-6.4.0/config/configure.xml

Name          Value
-------------------------------------------------------------------------------
CC            gcc
CFLAGS        -g -O2 -Wall -W -pthread
CONFIGURE     ./configure --prefix=/application/imagemagick-6.4.0
COPYRIGHT     Copyright (C) 1999-2008 ImageMagick Studio LLC
CPPFLAGS      -I/application/imagemagick-6.4.0/include/ImageMagick
CXX           g++
CXXFLAGS      -g -O2 -Wall -W -pthread
DEFS          -DHAVE_CONFIG_H
DELEGATES     bzlib fontconfig freetype jpeg png tiff x11 xml zlib
DISTCHECK_CONFIG_FLAGS --disable-deprecate --with-quantum-depth=16 --with-djvu=no --with-umem=no --with-fontpath= --with-lqr=no
EXEC-PREFIX   /application/imagemagick-6.4.0
HOST          x86_64-unknown-linux-gnu
LDFLAGS       -L/application/imagemagick-6.4.0/lib -L/usr/lib64 -lfreetype
LIB_VERSION   0x640
LIB_VERSION_NUMBER 6,4,0,0
LIBS          -lMagickCore -ltiff -lfreetype -ljpeg -lfontconfig -lXext -lSM -lICE -lX11 -lXt -lbz2 -lz -lm -lpthread
NAME          ImageMagick
PCFLAGS       
PREFIX        /application/imagemagick-6.4.0
QuantumDepth  16
RELEASE_DATE  09/19/14
VERSION       6.4.0
WEBSITE       http://www.imagemagick.org

2.3 验证支持的图片格式:
[root@test ImageMagick-6.4.0]# /application/imagemagick-6.4.0/bin/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 Picture Exchange Bitmap, Version 2.0.
           See SMPTE 268M-2003 specification at http://www.smtpe.org
           
     EPDF  PDF       rw-   Encapsulated Portable Document Format
      EPI  PS        rw-   Encapsulated PostScript Interchange format
      EPS  PS        rw-   Encapsulated PostScript
     EPS2* PS2       -w-   Level II Encapsulated PostScript
     EPS3* PS3       -w+   Level III Encapsulated PostScript
     EPSF  PS        rw-   Encapsulated PostScript
     EPSI  PS        rw-   Encapsulated PostScript Interchange format
      EPT  EPT       rw-   Encapsulated PostScript with TIFF preview
     EPT2  EPT       rw-   Encapsulated PostScript Level II with TIFF preview
     EPT3  EPT       rw+   Encapsulated PostScript Level III with TIFF preview
      FAX* FAX       rw+   Group 3 FAX
           FAX machines use non-square pixels which are 1.5 times wider than they
           are tall but computer displays use square pixels, therefore FAX images
           may appear to be narrow unless they are explicitly resized using a
           geometry of "150x100%".
           
     FITS* FITS      rw-   Flexible Image Transport System
  FRACTAL* PLASMA    r--   Plasma fractal image
      FTS* FTS       rw-   Flexible Image Transport System
        G* RAW       rw+   Raw green samples
       G3* FAX       rw-   Group 3 FAX
      GIF* GIF       rw+   CompuServe graphics interchange format
    GIF87* GIF       rw-   CompuServe graphics interchange format (version 87a)
 GRADIENT* GRADIENT  r--   Gradual passing from one shade to another
     GRAY* GRAY      rw+   Raw gray samples
HISTOGRAM* HISTOGRAM -w-   Histogram of the image
      HTM* HTML      -w-   Hypertext Markup Language and a client-side image map
     HTML* HTML      -w-   Hypertext Markup Language and a client-side image map
      ICB* TGA       rw+   Truevision Targa image
      ICO* ICON      rw+   Microsoft icon
     ICON* ICON      rw-   Microsoft icon
     INFO  INFO      -w+   The image format and characteristics
      IPL* IPL       rw+   IPL Image Sequence
   ISOBRL* BRAILLE   -w-   ISO/TR 11548-1 format
      JNG* PNG       rw-   JPEG Network Graphics
           See http://www.libpng.org/pub/mng/ for details about the JNG
           format.
     JPEG* JPEG      rw-   Joint Photographic Experts Group JFIF format (62)
      JPG* JPEG      rw-   Joint Photographic Experts Group JFIF format
        K* RAW       rw+   Raw black samples
      K25  DNG       r--   Kodak Digital Camera Raw Image Format
      KDC  DNG       r--   Kodak Digital Camera Raw Image Format
    LABEL* LABEL     r--   Image label
        M* RAW       rw+   Raw magenta samples
      M2V  MPEG      rw+   MPEG Video Stream
      MAP* MAP       rw-   Colormap intensities and indices
      MAT* MAT       rw+   MATLAB image format
    MATTE* MATTE     -w+   MATTE format
     MIFF* MIFF      rw+   Magick Image File Format
      MNG* PNG       rw+   Multiple-image Network Graphics (libpng 1.2.10)
           See http://www.libpng.org/pub/mng/ for details about the MNG
           format.
     MONO* MONO      rw-   Raw bi-level bitmap
      MPC* MPC       rw+   Magick Persistent Cache image format
     MPEG  MPEG      rw+   MPEG Video Stream
      MPG  MPEG      rw+   MPEG Video Stream
      MRW  DNG       r--   Sony (Minolta) Raw Image File
      MSL* MSL       rw+   Magick Scripting Language
     MSVG* SVG       rw+   ImageMagick's own SVG internal renderer
      MTV* MTV       rw+   MTV Raytracing image format
      MVG* MVG       rw-   Magick Vector Graphics
      NEF  DNG       r--   Nikon Digital SLR Camera Raw Image File
     NULL* NULL      rw-   Constant image of uniform color
        O* RAW       rw+   Raw opacity samples
      ORF  DNG       r--   Olympus Digital Camera Raw Image File
      OTB* OTB       rw-   On-the-air bitmap
      OTF* TTF       r--   Open Type font (Freetype 2.2.1)
      PAL* UYVY      rw-   16bit/pixel interleaved YUV
     PALM* PALM      rw+   Palm pixmap
      PAM* PNM       rw+   Common 2-dimensional bitmap format
  PATTERN* PATTERN   r--   Predefined pattern
      PBM* PNM       rw+   Portable bitmap format (black and white)
      PCD* PCD       rw-   Photo CD
     PCDS* PCD       rw-   Photo CD
      PCL  PCL       rw-   Printer Control Language
      PCT* PICT      rw-   Apple Macintosh QuickDraw/PICT
      PCX* PCX       rw-   ZSoft IBM PC Paintbrush
      PDB* PDB       rw+   Palm Database ImageViewer Format
      PDF  PDF       rw+   Portable Document Format
     PDFA  PDF       rw+   Portable Document Archive Format
      PEF  DNG       r--   Pentax Electronic File
      PFA* TTF       r--   Postscript Type 1 font (ASCII) (Freetype 2.2.1)
      PFB* TTF       r--   Postscript Type 1 font (binary) (Freetype 2.2.1)
      PFM* PFM       rw+   Portable float format
      PGM* PNM       rw+   Portable graymap format (gray scale)
    PICON* XPM       rw-   Personal Icon
     PICT* PICT      rw-   Apple Macintosh QuickDraw/PICT
      PIX* PIX       r--   Alias/Wavefront RLE image format
    PJPEG* JPEG      rw-   Progessive Joint Photographic Experts Group JFIF
   PLASMA* PLASMA    r--   Plasma fractal image
      PNG* PNG       rw-   Portable Network Graphics (libpng 1.2.10)
           See http://www.libpng.org/ for details about the PNG format.
    PNG24* PNG       rw-   opaque 24-bit RGB (zlib 1.2.3)
    PNG32* PNG       rw-   opaque or transparent 32-bit RGBA
     PNG8* PNG       rw-   8-bit indexed with optional binary transparency
      PNM* PNM       rw+   Portable anymap
      PPM* PNM       rw+   Portable pixmap format (color)
  PREVIEW* PREVIEW   -w-   Show a preview an image enhancement, effect, or f/x
       PS  PS        rw+   PostScript
      PS2* PS2       -w+   Level II PostScript
      PS3* PS3       -w+   Level III PostScript
      PSD* PSD       rw+   Adobe Photoshop bitmap
     PTIF* TIFF      rw-   Pyramid encoded TIFF
      PWP* PWP       r--   Seattle Film Works
        R* RAW       rw+   Raw red samples
      RAF  DNG       r--   Fuji CCD-RAW Graphic File
      RAS* SUN       rw+   SUN Rasterfile
      RGB* RGB       rw+   Raw red, green, and blue samples
     RGBA* RGB       rw+   Raw red, green, blue, and alpha samples
     RGBO* RGB       rw+   Raw red, green, blue, and opacity samples
      RLA* RLA       r--   Alias/Wavefront image
      RLE* RLE       r--   Utah Run length encoded image
      SCR* SCR       r--   ZX-Spectrum SCREEN$
      SCT* SCT       r--   Scitex HandShake
      SFW* SFW       r--   Seattle Film Works
      SGI* SGI       rw+   Irix RGB image
    SHTML* HTML      -w-   Hypertext Markup Language and a client-side image map
      SR2  DNG       r--   Sony Raw Format 2
      SRF  DNG       r--   Sony Raw Format
  STEGANO* STEGANO   r--   Steganographic image
      SUN* SUN       rw+   SUN Rasterfile
      SVG* SVG       rw+   Scalable Vector Graphics (XML 2.6.26)
     SVGZ* SVG       rw+   Compressed Scalable Vector Graphics (XML 2.6.26)
     TEXT* TXT       rw+   Text
      TGA* TGA       rw+   Truevision Targa image
THUMBNAIL* THUMBNAIL -w+   EXIF Profile Thumbnail
     TIFF* TIFF      rw+   Tagged Image File Format (LIBTIFF, Version 3.8.2)
   TIFF64* TIFF      ---   Tagged Image File Format (64-bit) (LIBTIFF, Version 3.8.2)
     TILE* TILE      r--   Tile image with a texture
      TIM* TIM       r--   PSX TIM
      TTC* TTF       r--   TrueType font collection (Freetype 2.2.1)
      TTF* TTF       r--   TrueType font (Freetype 2.2.1)
      TXT* TXT       rw+   Text
     UBRL* BRAILLE   -w-   Unicode Text format
      UIL* UIL       -w-   X-Motif UIL table
     UYVY* UYVY      rw-   16bit/pixel interleaved YUV
      VDA* TGA       rw+   Truevision Targa image
    VICAR* VICAR     rw-   VICAR rasterfile format
      VID* VID       rw+   Visual Image Directory
     VIFF* VIFF      rw+   Khoros Visualization image
      VST* TGA       rw+   Truevision Targa image
     WBMP* WBMP      rw-   Wireless Bitmap (level 0) image
      WMF* WMF       ---   Windows Meta File
      WMZ* WMZ       ---   Compressed Windows Meta File
      WPG* WPG       r--   Word Perfect Graphics
        X* X         rw+   X Image
      X3F  DNG       r--   Sigma Camera RAW Picture File
      XBM* XBM       rw-   X Windows system bitmap (black and white)
       XC* XC        r--   Constant image uniform color
      XCF* XCF       r--   GIMP image
      XPM* XPM       rw-   X Windows system pixmap (color)
      XPS  XPS       r--   Microsoft XML Paper Specification
       XV* VIFF      rw+   Khoros Visualization image
      XWD* XWD       rw-   X Windows system window dump (color)
        Y* RAW       rw+   Raw yellow samples
    YCbCr* YCbCr     rw+   Raw Y, Cb, and Cr samples
   YCbCrA* YCbCr     rw+   Raw Y, Cb, Cr, and opacity samples
      YUV* YUV       rw-   CCIR 601 4:1:1 or 4:2:2

* native blob support

2.4 下载 jmagick-linux-6.4.0-Q32.tar.gz
     #wget http://downloads.jmagick.org/6.4.0/jmagick-linux-6.4.0-Q32.tar.gz
     wget http://downloads.jmagick.org/6.4.0/jmagick-6.4.0-src.tar.gz
     tar zvxf jmagick-6.4.0-src.tar.gz
     cd 6.4.0
     ./configure --prefix=/application/jmagick-6.4.0 --with-java-home=/application/jdk --with-magick-home=/application/imagemagick-6.4.0
     make all
     make install

软件环境部署完毕,博主:开源人


版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。

相关文章
使用ImageMagick + Jmagick进行图片操作(续)
    由于没有图形化界面的支持,在Linux(CentOS 5.4 x64)上的配置相对Windows XP还是麻烦了一点。         1、下载ImageMagick和JMagick的源文件(http://downloads.jmagick.org/6.4.0/):ImageMagick-6.4.0.-0tar.gz 和 jmagick-6.4.0-src.tar.gz。
787 0
使用ImageMagick + Jmagick进行图片操作
      几年前曾经使用过这个开源的ImageMagick来进行图片大小转化、提取Exif信息等操作,功能强大,比较实用,当时也花了不少的精力。这两天又要用,这次先把过程记下来。       1. 首先给出这个地址:http://downloads.jmagick.org/6.3.9/,这个里面包含了ImageMagick的安装文件、jmagick.dll和jmagick.jar,最关键的是它们是版本一致的,不会出现一些奇怪的问题。
1090 0
+关注
club111
老薛Linux大讲堂
文章
问答
文章排行榜
最热
最新
相关电子书
更多
CentOS Nginx PHP JAVA多语言镜像使用手册
立即下载
低代码开发师(初级)实战教程
立即下载
阿里巴巴DevOps 最佳实践手册
立即下载