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

时间:2013-11-26 15:14:06

标签: 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

尝试执行以下命令:

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

2 个答案:

答案 0 :(得分:5)

通过此SO答案的另一个解决方案:ImageMagick no decode delegate

对我有用的是

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

答案 1 :(得分:3)

此问题的解决方案可在此处找到:http://ext.raneous.net/post/40106080462/building-graphicsmagick-on-osx

添加./configure CC=clang参数修复了问题,tiff支持现在按预期工作。