Bug 2660 - Unintended type replacement for private tags (e.g.: RichTIFFIPTC)
: Unintended type replacement for private tags (e.g.: RichTIFFIPTC)
Status: RESOLVED LATER
: libtiff
default
: unspecified
: PC Linux
: P2 normal
: ---
Assigned To:
:
:
: migrated_to_gitlab
:
:
  Show dependency treegraph
 
Reported: 2017-01-16 09:28 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-01-16 09:28:38
Dear Developer,

if you read a Tiff-TAG with TIFFGetField(), then change its value calling
TIFFSetField() and at the end call TIFFWriteDirectory(). The call to
TIFFWriteDirectory reports warnings like the following line and filters out all
these affected tags:

TIFFFetchNormalTag: Warning, Incompatible type for "RichTIFFIPTC"; tag ignored.

The problem is that libtiff defines datatype TIFF_LONG for RICHTIFFIPTC, but in
the original file it has datatype TIFF_UNDEFINED. The resulting tiff-file lacks
the Tag RICHTIFFIPTC then.

As a minimal example for this problem, please check
https://github.com/SLUB-digitalpreservation/fixit_tiff/blob/master/src/cleanup_icc_header.c
(lines 55 ff.)

The expected behaviour is:

* give a warning about wrong type,
* leave the private tag untouched and stupidly copy it to the new output file

With best regards

Andreas
------- Comment #1 From 2019-10-01 14:20:15 -------
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.