Tiff - Null count for "RichTIFFIPTC"

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
dirk1976
Posts: 27
Joined: 2010-09-08T22:16:11-07:00
Authentication code: 8675308
Location: Germany

Tiff - Null count for "RichTIFFIPTC"

Post 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.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Tiff - Null count for "RichTIFFIPTC"

Post by magick »

The exception is pushed from libtiff. ImageMagick just reports it. The image can still be identified, converted, or viewed with ImageMagick.
dirk1976
Posts: 27
Joined: 2010-09-08T22:16:11-07:00
Authentication code: 8675308
Location: Germany

Re: Tiff - Null count for "RichTIFFIPTC"

Post 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.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Tiff - Null count for "RichTIFFIPTC"

Post 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.
Post Reply