jmagick安装

1.安装依赖包:
  yum -y install libjpeg libjpeg-devel libpng libpng-devel
2.安装ImageMagick
  tar xzvf ImageMagick-6.4.0-0.tar.gz
  cd ImageMagick-6.4.0
  ./configure --prefix=/opt/ImageMagick --enable-shared --without-perl
  make
  make install
  make check
  convert -list format
3.配置IMAGEMAGICK的环境变量:
  export IMAGEMAGICK_HOME=/opt/ImageMagick
4.安装jmagick
  yum install file
  jmagick-6.4.0
  ./configure --prefix=/opt/JMagick --with-magick-home=$IMAGEMAGICK_HOME --enable-share --enable-static --with-java-home=$JAVA_HOME -with-magick-inc-dir=/opt/ImageMagick/include/ImageMagick

  make & make install

  cp jmagick-6.4.0.jar /usr/java/default/jre/lib/ext/

5.配置jmagick环境变量:
   export IMAGEMAGICK_HOME=/opt/ImageMagick
  export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL

4.测试切图是否安装成功:

  convert -resize 100X100 aa.jpg aa01.jpg

你可能感兴趣的:(jmagick)