4

I have installed GM on OSX 10.9. Executing gm version prints the following:

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

Trying to execute the following command:

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

Returns an error:

org.gm4java.engine.GMException: identify: No decode delegate for this image format (/Users/latu/Desktop/vent.tiff).

Based on the version output, I assume TIFF support is disabled for some reason, although I cant seem to find a solution to this online. I have also tried executing the command from terminal directly (gm identify path), and the same error message is returned. Any feedback on what might be causing this would be greatly appreciated.

Update

I have installed tiff,zlib and jpeg libraries but I still get this when I run ./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
Giannis
  • 5,286
  • 15
  • 58
  • 113
  • Do you have libtiff installed? You probably want to make sure you have libpng too while you're at it, – JimB Nov 27 '13 at 14:21
  • I downloaded and installed tiff-4.0.3 (libtiff),zlib, and jpegsr9 from the delegates. Although it doesn't seem to make any difference. If I run ./configure, it does not detect anything when its looking for tiff. – Giannis Nov 27 '13 at 14:31
  • you don't want jpegsr9 for GM, jpeg8 is still the preferred version (which your system should have). If you're not installing them in `/usr/local`, with the headers in `/usr/local/include`, you'll have to tell configure where to look. You can also easily install all of this with a single `brew install graphicsmagick` using homebrew. Homebrew may also help you sort out if you have a general problem with your build env. – JimB Nov 27 '13 at 15:08
  • GraphicsMagick jconfig.h jerror.h jmorecfg.h jpeglib.h tiff.h tiffconf.h tiffio.h tiffio.hxx tiffvers.h zconf.h zlib.h there are within /usr/local/include. I will be installing homebrew most likely,to give it a try, as I cant find how to get this working. – Giannis Nov 27 '13 at 15:28
  • @JimB ./configure CC=clang when making gm was the solution. – Giannis Nov 27 '13 at 15:57
  • hmm, I wonder why that needs to be done. I can build with configure using clang, gcc and llvm-gcc with no problems. – JimB Nov 27 '13 at 16:26
  • Maybe its an issue specific to 10.9 – Giannis Nov 28 '13 at 09:12

2 Answers2

5

Another solution to this via this SO answer: ImageMagick no decode delegate

What worked for me was

  1. brew install libtiff to make sure that libtiff was installed
  2. brew install graphicsmagick --with-libtiff
Community
  • 1
  • 1
drebabels
  • 1,992
  • 3
  • 17
  • 13
3

The solution to this problem is found here: http://ext.raneous.net/post/40106080462/building-graphicsmagick-on-osx

Adding ./configure CC=clang parameter has fixed the problem, and tiff support works as expected now.

Dorian
  • 22,759
  • 8
  • 120
  • 116
Giannis
  • 5,286
  • 15
  • 58
  • 113