Installation GraphicsMagick:此图像格式没有解码委托
我已经在OSX 10.9上安装了GM。执行Installation GraphicsMagick:此图像格式没有解码委托,installation,graphicsmagick,Installation,Graphicsmagick,我已经在OSX 10.9上安装了GM。执行gm版本打印以下内容: 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/Copyrig
gm版本
打印以下内容:
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:identified:No decode委托
图像格式(/Users/latu/Desktop/vent.tiff)
基于版本输出,我假设TIFF支持由于某种原因被禁用,尽管我似乎无法在线找到解决方案。我还尝试直接从终端执行命令(gm标识路径)
,并返回相同的错误消息。
如果您对可能导致这种情况的原因有任何反馈,我们将不胜感激
更新
我已经安装了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
此问题的解决方案如下所示:
添加
/configure CC=clang
参数已修复该问题,tiff支持现在可以正常工作 另一个解决方案是通过这个SO答案:
对我有效的是
brew安装libtiff
以确保已安装libtiffbrew安装graphicsmagick--使用libtiff
您是否安装了libtiff?您可能想确保在使用libpng时也有libpng,我从代表处下载并安装了tiff-4.0.3(libtiff)、zlib和jpegsr9。虽然这似乎没有什么区别。如果我运行./configure,它在查找tiff时不会检测到任何东西。如果您不希望GM使用jpegsr9,jpeg8仍然是首选版本(您的系统应该有)。如果您没有在
/usr/local
中安装它们,并且头文件在/usr/local/include
中,则必须告诉configure在何处查找。您还可以使用自制的brew安装graphicsmagick
轻松安装所有这些。如果您的build env.GraphicsMagick jconfig.h jerror.h jmorecfg.h jpeglib.h tiff.h tiffconf.h tiffio.h tiffio.hxx tiffers.h zconf.h zlib.h在/usr/local/include中存在一般性问题,自制软件还可以帮助您解决。我很可能会安装自制软件,尝试一下,因为我找不到如何让它正常工作。@JimB./configure CC=clang make gm是解决方案。对于已经通过brew安装graphicsmagick的用户:brew重新安装graphicsmagick--with libtiff