Page 1 of 1

Tiff - Null count for "RichTIFFIPTC"

Posted: 2017-08-21T05:34:57-07:00
by dirk1976
If a tiff file contains the tag 33723 (0x83BB, IPTC) but the count is 0 (zero) then IM report the following exception:
convert: test.tif: Null count for "RichTIFFIPTC" (type 4, writecount -3, passcount 1). `_TIFFVSetField' @ error/tiff.c/TIFFErrors/572.

A test image can be found here: https://www.dropbox.com/s/f42y9p41vbb4v38/test.tif?dl=1

Tested with versions 7.0.6 and 6.9.7.

Re: Tiff - Null count for "RichTIFFIPTC"

Posted: 2017-08-21T06:33:45-07:00
by magick
The exception is pushed from libtiff. ImageMagick just reports it. The image can still be identified, converted, or viewed with ImageMagick.

Re: Tiff - Null count for "RichTIFFIPTC"

Posted: 2017-08-21T22:21:42-07:00
by dirk1976
Yes, you're right the image can be processed. The question is how a program can handle this? Converting this image with magick wand fails with an exception and the convert command fails with error level 1. If the image could be processed then no error should be thrown.

Re: Tiff - Null count for "RichTIFFIPTC"

Posted: 2017-08-22T03:13:43-07:00
by magick
ImageMagick supports warnings and errors. The TIFF delegate library pushes an error for this exception rather than a warning. Its up to you to decide if you want to continue processing an image after an error is thrown. In many cases, errors prevents further processing because it might be a security issue.