GraphicsMagick:此图像格式没有解码委托

Gia*_*nis 4 installation graphicsmagick

我在OSX 10.9上安装了GM.执行gm version打印以下内容:

GraphicsMagick 1.3.18 2013-03-10 Q8 http://www.GraphicsMagick.org/
Copyright (C) 2002-2013 GraphicsMagick Group.
Additional copyrights and licenses apply to this software.
See http://www.GraphicsMagick.org/www/Copyright.html for details.

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

Host type: x86_64-apple-darwin13.0.0

Configured using the command:
  ./configure 

Final Build Parameters:
  CC       = gcc
  CFLAGS   = -g -O2 -Wall -D_THREAD_SAFE
  CPPFLAGS = -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/libxml2
  CXX      = g++
  CXXFLAGS = -D_THREAD_SAFE
  LDFLAGS  = -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/lib
  LIBS     = -lbz2 -lxml2 -lz -lm -lpthread
Run Code Online (Sandbox Code Playgroud)

尝试执行以下命令:

String [] commands = new String [] {"identify"," - format","%h |%w |%b |%t |%e",image_file.getAbsolutePath()};

返回错误:

org.gm4java.engine.GMException:identify:此图像格式没有解码委托(/Users/latu/Desktop/vent.tiff).

基于版本输出,我假设TIFF支持由于某种原因被禁用,虽然我似乎无法在线找到解决方案.我也尝试直接从终端执行命令(gm identify path),并返回相同的错误消息.任何有关可能导致此问题的反馈都将非常感激.

更新

我已经安装了tiff,zlib和jpeg库,但是当我运行./configure时我仍然会得到它

checking for TIFF support ... 
checking tiff.h usability... no
checking tiff.h presence... no
checking for tiff.h... no
checking tiffio.h usability... no
checking tiffio.h presence... no
checking for tiffio.h... no
checking for TIFFOpen in -ltiff... no
checking for TIFFClientOpen in -ltiff... no
checking for TIFFIsByteSwapped in -ltiff... no
checking for TIFFReadRGBATile in -ltiff... no
checking for TIFFReadRGBAStrip in -ltiff... no
checking if TIFF package is complete... no
Run Code Online (Sandbox Code Playgroud)

dre*_*els 5

通过这个SO答案的另一个解决方案:ImageMagick没有解码委托

对我有用的是

  1. brew install libtiff 确保安装了libtiff
  2. brew install graphicsmagick --with-libtiff

  • 对于已经通过 brew 安装了 graphicsmagick 的用户: brew 重新安装 graphicsmagick --with-libtiff (2认同)