identify from shell does not return output on 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
tyrwh
Posts: 1
Joined: 2017-03-08T08:59:33-07:00
Authentication code: 1151

identify from shell does not return output on very large TIFF

Post by tyrwh »

Apologies if this has been asked before, could not find a similar issue on the forum.

I am trying to crop a very large (4Gb) TIFF. I'd first like to get its dimensions. Running identify, verbose or not, does not give me any output:

Code: Select all

identify M3_2016_06_27_high.tif
identify -verbose M3_2016_06_27_high.tif
Running the same commands on a lower-res (40Mb) TIFF of the same image returns output as expected:

Code: Select all

identify M3_2016_06_27_low.tif
identify -verbose M3_2016_06_27_low.tif
Trying to convert the large file to MPC for easier handling does not seem to register the large TIFF as an image:

Code: Select all

convert M3_2016_06_27_high.tif foo.mpc
convert: no images defined `foo.mpc' @ error/convert.c/ConvertImageCommand/3210.
While doing the same on the low-res version works just fine:

Code: Select all

convert M3_2016_06_27_low.tif foo.mpc
I don't think the large TIFF is corrupted, as I've tried running identify on some corrupted images I have and do get some useful output. Not sure if libtiff might be the culprit, but I have 4.0.6 installed.

Both the high-res and low-res TIFFs were output by Agisoft PhotoScan after being stitched from smaller images.

I am using ImageMagick 6.8.9-9, Q16 on Linux (Ubuntu 16.04, kernel 4.4.31), calling from the shell.

Any thoughts on what the matter could be?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: identify from shell does not return output on very large TIFF

Post by fmw42 »

It may just be very slow if you do not have enough memory to hold your TIFF, so it is using disk space. How much RAM do you have?

Try

Code: Select all

identify -ping M3_2016_06_27_low.tif
Otherwise, you may need to change your memory usage in policy.xml. Alternately install bigtiff http://bigtiff.org/ and http://www.awaresystems.be/imaging/tiff/bigtiff.html.

The normal tiff delegate is limited to 4GB. So you may be on the ragged edge.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: identify from shell does not return output on very large TIFF

Post by fmw42 »

It may be a limitation on dimensions or file size in your Imagemagick policy.xml file. You can edit that file.
Post Reply