GraphicsMagick在mac系统上的用brew的装配

Homebrew安装http://www.cnblogs.com/TankXiao/p/3247113.html

官网:https://brew.sh/index_zh-cn.html


******************************************************
*   安装jpeg包
******************************************************

brew install libjpeg

安装在了/usr/local/Cellar/jpeg/8d


  
******************************************************
*   安装jasper包 
******************************************************

brew install jasper

安装在/usr/local/Cellar/jasper/1.900.1



******************************************************
*   安装libpng
******************************************************


brew install libpng

安装在了/usr/local/Cellar/libpng/1.6.17

 


******************************************************
*   安装freetype包
******************************************************

brew install freetype

安装在了/usr/local/Cellar/freetype/2.5.5




******************************************************
*   安装zlib包
******************************************************

系统自带不用安装了

******************************************************
*   安装GraphicsMagick
****************************************************** 


自动安装:brew install GraphicsMagick

安装在了/usr/local/Cellar/graphicsmagick/1.3.21

 


******************************************************
*   查看安装信息
****************************************************** 
gm -version

-------------- 以下为 gm -version 的输出信息 ------------------------

GraphicsMagick 1.3.21 2015-02-28 Q8 http://www.GraphicsMagick.org/
Copyright (C) 2002-2014 GraphicsMagick Group.
Additional copyrights and licenses apply to this software.
See http://www.GraphicsMagick.org/www/Copyright.html for details.

Feature Support:
  Native Thread Safe       yes
  Large Files (> 32 bit)   yes
  Large Memory (> 32 bit)  yes
  BZIP                     yes
  DPS                      no
  FlashPix                 no
  FreeType                 yes
  Ghostscript (Library)    no
  JBIG                     no
  JPEG-2000                no
  JPEG                     yes
  Little CMS               no
  Loadable Modules         yes
  OpenMP                   no
  PNG                      yes
  TIFF                     no
  TRIO                     no
  UMEM                     no
  WebP                     no
  WMF                      no
  X11                      no
  XML                      no
  ZLIB                     yes

Host type: x86_64-apple-darwin13.4.0

Configured using the command:
  ./configure  '--prefix=/usr/local/Cellar/graphicsmagick/1.3.21' '--disable-dependency-tracking' '--enable-shared' '--disable-static' '--with-modules' '--disable-openmp' '--without-gslib' '--with-gs-font-dir=/usr/local/share/ghostscript/fonts' '--without-x' '--without-lcms' '--without-lcms2' 'CC=clang' 'CXX=clang++'

Final Build Parameters:
  CC       = clang
  CFLAGS   = -g -O2 -Wall -D_THREAD_SAFE
  CPPFLAGS = -I/usr/local/Cellar/freetype/2.5.5/include/freetype2
  CXX      = clang++
  CXXFLAGS = -D_THREAD_SAFE
  LDFLAGS  = -L/usr/local/Cellar/freetype/2.5.5/lib
  LIBS     = -lfreetype -lbz2 -lz -lltdl -lm -lpthread
  
-------------- 以上为 gm -version 的输出信息 ------------------------


******************************************************
*   IM4JAVA调用GraphicsMagick 的简单示例
******************************************************

IM4JAVA下载地址 http://sourceforge.net/projects/im4java/files/
将IM4JAVA下载文件中的jar文件放到你的java的lib目录下就可以开始使用IM4JAVA了。


-------------- 以下为 IM4JAVA调用GraphicsMagick 的示例代码 ------------------------
// create command
ConvertCmd cmd = new ConvertCmd(true); //true表示使用GraphicsMagick ,false表示使用ImageMagick
cmd.setSearchPath("/usr/local/Cellar/graphicsmagick/1.3.21/bin");//设置 GraphicsMagick的bin目录
// create the operation, add images and operators/options
IMOperation op = new IMOperation();
op.addImage(srcFile);
op.resize(150,150);
op.addImage(dstFile);
// execute the operation
cmd.run(op);
-------------- 以上为 IM4JAVA调用GraphicsMagick 的示例代码 ------------------------

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值