Page 1 of 1

identify from shell does not return output on very large TIFF

Posted: 2017-03-08T09:28:38-07:00
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?

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

Posted: 2017-03-08T09:48:16-07:00
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.

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

Posted: 2017-03-10T15:30:23-07:00
by fmw42
It may be a limitation on dimensions or file size in your Imagemagick policy.xml file. You can edit that file.