ImageMagick can't decode a very large tiff?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
anyoneis
Posts: 19
Joined: 2011-08-08T12:29:34-07:00
Authentication code: 8675308

ImageMagick can't decode a very large tiff?

Post by anyoneis »

I am getting the dreaded (because it is all over googlespace) message:
  • Magick: no decode delegate for this image format `target.tif' @ error/constitute.c/ReadImage/532.
using:
  • identify -list resource
    • File Area Memory Map Disk Thread Time
      -------------------------------------------------------------------------------
      2048 20GB 2.794GiB 93.132GiB 238.42GiB 128 unlimited
    identify -version
    • Version: ImageMagick 6.7.1-0 2011-07-06 Q16 http://www.imagemagick.org
      Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
      Features: OpenMP
    identify target.tif
    • Magick: no decode delegate for this image format `target.tif' @ error/constitute.c/ReadImage/532.
Using a different image viewer, I see these characteristics:
  • Width: 107680 pixels
    Height: 78992 pixels
    File Size: 1398.54 MB
    Compression Ratio: 17.4006
The trace file seemed unhelpful:
  • 2011-08-16T09:46:55-07:00 0:00.216 0.031u 6.7.1 Trace Magick[5676]: blob.c/GetBlobSize/1314/Trace
    target.tif
    2011-08-16T09:46:55-07:00 0:00.217 0.031u 6.7.1 Trace Magick[5676]: blob.c/IsBlobSeekable/2031/Trace
    target.tif
    2011-08-16T09:46:55-07:00 0:00.217 0.031u 6.7.1 Trace Magick[5676]: blob.c/CloseBlob/478/Trace
    target.tif
    2011-08-16T09:46:55-07:00 0:00.217 0.031u 6.7.1 Trace Magick[5676]: blob.c/GetBlobSize/1314/Trace
    target.tif
    2011-08-16T09:46:55-07:00 0:00.218 0.031u 6.7.1 Trace Magick[5676]: blob.c/DetachBlob/657/Trace
    ...
    2011-08-16T09:46:55-07:00 0:00.218 0.031u 6.7.1 Trace Magick[5676]: image.c/DestroyImage/1231/Trace
    target.tif
    2011-08-16T09:46:55-07:00 0:00.219 0.031u 6.7.1 Trace Magick[5676]: cache.c/DestroyImagePixels/1405/Trace
    target.tif
    2011-08-16T09:46:55-07:00 0:00.219 0.031u 6.7.1 Trace Magick[5676]: stream.c/DestroyPixelStream/217/Trace
    target.tif
    2011-08-16T09:46:55-07:00 0:00.219 0.031u 6.7.1 Trace Magick[5676]: property.c/DestroyImageProperties/288/Trace
    target.tif
    2011-08-16T09:46:55-07:00 0:00.220 0.031u 6.7.1 Trace Magick[5676]: artifact.c/DestroyImageArtifacts/231/Trace
    target.tif
    2011-08-16T09:46:55-07:00 0:00.220 0.031u 6.7.1 Trace Magick[5676]: blob.c/DestroyBlob/607/Trace
    target.tif
    2011-08-16T09:46:55-07:00 0:00.221 0.031u 6.7.1 Trace Magick[5676]: blob.c/CloseBlob/478/Trace
    target.tif
    2011-08-16T09:46:55-07:00 0:00.221 0.031u 6.7.1 Trace Magick[5676]: magick.c/GetImageDecoder/151/Trace
    ...
At this point the bad image looks like this:
  • 2011-08-16T09:46:55-07:00 0:00.221 0.031u 6.7.1 Trace Magick[5676]: configure.c/GetConfigureOptions/549/Trace
    delegates.xml
    2011-08-16T09:46:55-07:00 0:00.222 0.031u 6.7.1 Trace Magick[5676]: configure.c/GetConfigurePaths/631/Trace
    delegates.xml
    2011-08-16T09:46:55-07:00 0:00.222 0.031u 6.7.1 Trace Magick[5676]: hashmap.c/AppendValueToLinkedList/165/Trace
    ...
    2011-08-16T09:46:55-07:00 0:00.223 0.031u 6.7.1 Trace Magick[5676]: hashmap.c/AppendValueToLinkedList/165/Trace
    ...
    2011-08-16T09:46:55-07:00 0:00.223 0.031u 6.7.1 Trace Magick[5676]: utility.c/GetPathComponent/1292/Trace
    c:\Program Files\ImageMagick-6.7.1-Q16\CORE_RL_magick_.dll
    2011-08-16T09:46:55-07:00 0:00.224 0.031u 6.7.1 Trace Magick[5676]: hashmap.c/RemoveElementByValueFromLinkedList/1648/Trace
But a good image looks like this:
  • 2011-08-16T10:02:37-07:00 0:00.228 0.031u 6.7.1 Trace Magick[5252]: magick.c/GetMagickThreadSupport/771/Trace
    ...
    2011-08-16T10:02:37-07:00 0:00.228 0.031u 6.7.1 Trace Magick[5252]: magick.c/GetImageDecoder/151/Trace
    ...
    2011-08-16T10:02:37-07:00 0:00.229 0.031u 6.7.1 Trace Magick[5252]: tiff.c/ReadTIFFImage/817/Trace
    target.tif
    2011-08-16T10:02:37-07:00 0:00.229 0.031u 6.7.1 Trace Magick[5252]: image.c/AcquireImage/159/Trace
It is possible that the file is not cricket tiff since the viewer which works is playing for the same team, but it is also possible that this is the result of some capacity limitation. Any ideas?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: ImageMagick can't decode a very large tiff?

Post by fmw42 »

perhaps you need to post a link to this tif image if it is not too terribly big, so others can test it.

what platform are you on? did you install form binary or source? if the latter, did you install libtif? what do you get from

convert -list configure

look at the line DELEGATES and see if it includes tif
anyoneis
Posts: 19
Joined: 2011-08-08T12:29:34-07:00
Authentication code: 8675308

Re: ImageMagick can't decode a very large tiff?

Post by anyoneis »

Hi. I am running the Q8 and Q16 Windows static builds, so they do include tif. I have several other images from the same source which work fine, but none so large. The next largest image (which works fine) is:
  • Width: 72224 pixels
    Height: 64080 pixels
    File Size: 1324.66 MB
    Compression Ratio: 9.9959
You can find the failing image here:

https://safesync.com/LMHmmPNQ/Hudkins_W ... tGEaBvtyTo

David
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: ImageMagick can't decode a very large tiff?

Post by fmw42 »

file not found.

furthermore, you may very well be running out of memory on a huge image. see http://www.imagemagick.org/Usage/files/#massive
anyoneis
Posts: 19
Joined: 2011-08-08T12:29:34-07:00
Authentication code: 8675308

Re: ImageMagick can't decode a very large tiff?

Post by anyoneis »

Sorry. The site gave me a stale link:
https://safesync.com/LMHmmPNQ/WRL_15_1B ... tGEaBvtyTo

David
anyoneis
Posts: 19
Joined: 2011-08-08T12:29:34-07:00
Authentication code: 8675308

Re: ImageMagick can't decode a very large tiff?

Post by anyoneis »

furthermore, you may very well be running out of memory on a huge image. see http://www.imagemagick.org/Usage/files/#massive
I don't think so. I have 148GB available on the MAGICK_TMPDIR drive. Identify doesn't need any output space so I think that is the only disk requirement. Identify fails immediately.

Update: I just tried a drive with a terabyte as the MAGICK_TMPDIR - no joy.

David
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: ImageMagick can't decode a very large tiff?

Post by fmw42 »

I am talking about RAM not disk space. IM has to hold at least one copy of the image in memory and depending upon the processing could be multiple copies.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: ImageMagick can't decode a very large tiff?

Post by magick »

Your image is a BigTIFF and it requires that ImageMagick be built with the BigTIFF version of the TIFF library. We confirmed your image can be read with ImageMagick built with libtiff-4.0 Beta.
anyoneis
Posts: 19
Joined: 2011-08-08T12:29:34-07:00
Authentication code: 8675308

Re: ImageMagick can't decode a very large tiff?

Post by anyoneis »

Thank you sir or madam! I will give that a try if I can figure out how!

For anyone with a similar problem, try overriding the default file type sensing using a syntax such as:

Code: Select all

identify tiff:"WRL 15 1b.tif"
You will then get more helpful output:
identify: This is a BigTIFF file. This format not supported
by this version of libtiff.. `WRL 15 1b.tif' @ error/tiff.c/TIFFErrors/497.
David
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: ImageMagick can't decode a very large tiff?

Post by fmw42 »

I think Magick is suggesting that you manually install the BigTiff delegate library, then reinstall IM from source. See http://www.aperio.com/bigtiff/
anyoneis
Posts: 19
Joined: 2011-08-08T12:29:34-07:00
Authentication code: 8675308

Re: ImageMagick can't decode a very large tiff?

Post by anyoneis »

I've spent two days on this and I am not any closer. Can I please get a few more hints?

I can build the Static MT version of the utilities, but I have no idea how to use the libtiff.lib static link library from aperio or the 4.0 beta library.

Thanks,
David
Post Reply