Bug 2749 - libtiff should not throw errors on TIFF/IT
: libtiff should not throw errors on TIFF/IT
Status: RESOLVED LATER
: libtiff
default
: unspecified
: PC Linux
: P2 enhancement
: ---
Assigned To:
:
:
: migrated_to_gitlab
:
:
  Show dependency treegraph
 
Reported: 2017-11-22 06:37 by
Modified: 2019-10-01 14:20 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2017-11-22 06:37:08
Hi,

we have a specific image we try to convert using imagemagick's  convert. 

$ tiffinfo /tmp/32a17fcbf0d52b11428929e705d8b81c2d474873
TIFFReadDirectory: Warning, Unknown field with tag 34016 (0x84e0) encountered.
TIFFReadDirectory: Warning, Unknown field with tag 34017 (0x84e1) encountered.
TIFFReadDirectory: Warning, Unknown field with tag 34018 (0x84e2) encountered.
TIFFReadDirectory: Warning, Unknown field with tag 34019 (0x84e3) encountered.
TIFFReadDirectory: Warning, Unknown field with tag 34020 (0x84e4) encountered.
TIFFReadDirectory: Warning, Unknown field with tag 34021 (0x84e5) encountered.
TIFFReadDirectory: Warning, Unknown field with tag 34022 (0x84e6) encountered.
TIFFReadDirectory: Warning, Unknown field with tag 34023 (0x84e7) encountered.
TIFFReadDirectory: Warning, Unknown field with tag 34024 (0x84e8) encountered.
TIFFReadDirectory: Warning, Unknown field with tag 34025 (0x84e9) encountered.
TIFFReadDirectory: Warning, Unknown field with tag 34026 (0x84ea) encountered.
TIFFReadDirectory: Warning, Unknown field with tag 34027 (0x84eb) encountered.
TIFFReadDirectory: Warning, Unknown field with tag 34028 (0x84ec) encountered.
TIFFReadDirectory: Warning, Unknown field with tag 34029 (0x84ed) encountered.
TIFFReadDirectory: Warning, Unknown field with tag 34030 (0x84ee) encountered.
_TIFFVSetField: /tmp/32a17fcbf0d52b11428929e705d8b81c2d474873: Null count for
"Tag 34022" (type 1, writecount -3, passcount 1).
_TIFFVSetField: /tmp/32a17fcbf0d52b11428929e705d8b81c2d474873: Null count for
"Tag 34025" (type 1, writecount -3, passcount 1).
_TIFFVSetField: /tmp/32a17fcbf0d52b11428929e705d8b81c2d474873: Null count for
"Tag 34026" (type 1, writecount -3, passcount 1).
[...]

imagemagick then returns with an error. gimp complains but opens it.

​https://github.com/SLUB-digitalpreservation/checkit_tiff says the following
for the image:

(EE)    tag 34030 (IT8HCUSAGE)  --> Tag needs to be whitelisted in
configuration, but isn't. (lineno: -1)
(EE)    tag 34029 (IT8COLORCHARACTERIZATION)    --> Tag needs to be whitelisted
in configuration, but isn't. (lineno: -1)
(EE)    tag 34028 (IT8TRANSPARENCYINDICATOR)    --> Tag needs to be whitelisted
in configuration, but isn't. (lineno: -1)
(EE)    tag 34027 (IT8PIXELINTENSITYRANGE)      --> Tag needs to be whitelisted
in configuration, but isn't. (lineno: -1)
(EE)    tag 34026 (IT8BKGCOLORVALUE)    --> Tag needs to be whitelisted in
configuration, but isn't. (lineno: -1)
(EE)    tag 34025 (IT8IMAGECOLORVALUE)  --> Tag needs to be whitelisted in
configuration, but isn't. (lineno: -1)
(EE)    tag 34024 (IT8BKGCOLORINDICATOR)        --> Tag needs to be whitelisted
in configuration, but isn't. (lineno: -1)
(EE)    tag 34023 (IT8IMAGECOLORINDICATOR)      --> Tag needs to be whitelisted
in configuration, but isn't. (lineno: -1)
(EE)    tag 34022 (IT8COLORTABLE)       --> Tag needs to be whitelisted in
configuration, but isn't. (lineno: -1)
(EE)    tag 34021 (IT8BITSPEREXTENDEDRUNLENGTH) --> Tag needs to be whitelisted
in configuration, but isn't. (lineno: -1)
(EE)    tag 34020 (IT8BITSPERRUNLENGTH) --> Tag needs to be whitelisted in
configuration, but isn't. (lineno: -1)
(EE)    tag 34019 (IT8RASTERPADDING)    --> Tag needs to be whitelisted in
configuration, but isn't. (lineno: -1)
(EE)    tag 34018 (IT8HEADER)   --> Tag needs to be whitelisted in
configuration, but isn't. (lineno: -1)
(EE)    tag 34017 (IT8COLORSEQUENCE)    --> Tag needs to be whitelisted in
configuration, but isn't. (lineno: -1)
(EE)    tag 34016 (IT8SITE)     --> Tag needs to be whitelisted in
configuration, but isn't. (lineno: -1)
(./)    tag 254 (SubFileType)   --> One or more conditions needs to be combined
in a logical_or operation (open) (lineno: 18)
(./)    tag 256 (ImageWidth)    --> TIFF should contain this tag. (lineno: 21)
(./)    tag 258 (BitsPerSample) --> One or more conditions needs to be combined
in a logical_or operation (open) (lineno: 34)
(EE)    tag 259 (Compression)   --> One or more conditions needs to be combined
in a logical_or operation (close) internal parser state, combine multiple rules
with logical or closed (lineno: 47)
(EE)    tag 259 (Compression)   --> Tag should have one exact value. Unexpected
tag value. found: 1 (lineno: 47)
(./)    tag 259 (Compression)   --> Tag should have one exact value. (lineno:
47)
(./)    tag 262 (Photometric)   --> One or more conditions needs to be combined
in a logical_or operation (open) (lineno: 52)
(./)    tag 273 (StripOffsets)  --> TIFF should contain this tag. (lineno: 57)
(./)    tag 274 (Orientation)   --> Tag should have one exact value. (lineno:
60)
(./)    tag 277 (SamplesPerPixel)       --> Tag should have one exact value.
(lineno: 64)
(./)    tag 278 (RowsPerStrip)  --> TIFF should contain this tag. (lineno: 70)
(./)    tag 279 (StripByteCounts)       --> TIFF should contain this tag.
(lineno: 73)
(./)    tag 282 (XResolution)   --> TIFF should contain this tag. (lineno: 76)
(./)    tag 296 (ResolutionUnit)        --> One or more conditions needs to be
combined in a logical_or operation (open) (lineno: 90)
(EE)Found 17 errors(EE)No, the given tif is not valid :(

so it's actually a TIFF/IT image.

One can argue that imagemagick shouldn't return with an error but I think it's
better to not have applications handling this itself but libtiff just ignoring
the TIFF/IT-specific stuff and just trying its best.. As the gimp example shows
there is something sensible coming out of it.

Regards,

Rene
------- Comment #1 From 2017-11-22 06:40:47 -------
FWIW:

ii  libtiff5:amd64                                        4.0.8-6              
          amd64                           Tag Image File Format (TIFF) library

but there's no 4.0.8 selectable in the versions
------- Comment #2 From 2019-10-01 14:20:48 -------
Bugzilla is no longer used for tracking libtiff issues. Remaining open tickets,
such as this one, have been migrated to the libtiff GitLab instance at
https://gitlab.com/libtiff/libtiff/issues .

The migrated tickets have their summary prefixed with [BZ#XXXX] where XXXX is
the initial Bugzilla issue number.