After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 768950 - TIFF: Unknown field with tag 59932 (0xea1c) encountered
TIFF: Unknown field with tag 59932 (0xea1c) encountered
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Plugins
2.8.18
Other All
: Normal normal
: 2.10
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2016-07-19 13:42 UTC by Paul Barter
Modified: 2016-07-23 17:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Sample file exhibiting problem (1.64 MB, image/tiff)
2016-07-23 14:50 UTC, Paul Barter
Details

Description Paul Barter 2016-07-19 13:42:53 UTC
I get this error message when opening a TIFF file into GIMP. This file has been previously rotated by 90 degrees using Windows Photo Viewer under Win 10 before loading into GIMP. If I load image without using rotate under Photo Viewer then message does not appear. 
Message disappears after loading, so does not cause a problem. Just annoying.
Comment 1 Jehan 2016-07-23 13:22:02 UTC
Hi,

So that's only this one file, not any tiff file, right?
Would it be possible to upload this file so that we get a look at it?
Thanks.
Comment 2 Paul Barter 2016-07-23 14:50:01 UTC
Created attachment 332027 [details]
Sample file exhibiting problem

I attach a sample file which exhibits the problem.
The problem seems to occur in any file rotated by Photo Viewer. 
I don't see the message if I load from Explorer into GIMP, only if I open inside GIMP
Comment 3 Jehan 2016-07-23 15:24:09 UTC
I get this error with ImageMagick too (`identify` command) on your file:

> $ identify bla.tiff
> bla.tiff TIFF 4871x7760 4871x7760+0+0 1-bit Bilevel Gray 1.722MB 0.000u 0:00.000
> identify: Unknown field with tag 59932 (0xea1c) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/887.
> identify: Unknown field with tag 59932 (0xea1c) encountered. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/887.
> identify: Unknown field with tag 59932 (0xea1c) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/887.

It looks like Windows Photo Viewer recorded private tags (i.e. which are not in the spec) inside the tiff. ImageMagick developer seem to say this is not standard (http://www.imagemagick.org/discourse-server/viewtopic.php?t=13587) but actually in the TIFF spec (http://partners.adobe.com/public/developer/en/tiff/TIFF6.pdf), I read:

> An organization might wish to store information meaningful to only that organi-zation in a TIFF file. Tags numbered 32768 or higher, sometimes called privatetags, are reserved for that purpose

(page 8: Private Fields and Values)

So I agree this should not be considered a problem. GIMP should simply ignore the private tags (and probably copy them along) but not popup warnings for these.
Comment 4 Jehan 2016-07-23 16:24:12 UTC
Ok. So we used to have this working as expected (i.e. no warning showing up for private tags), hence this was a regression of bug 131975. This is because libtiff changed some of its warning messages in version 4.0.0.

commit 3cb70e67cce56960ab1055e6ef7f72eff1abf55c
Author: Jehan <jehan@girinstud.io>
Date:   Sat Jul 23 18:07:58 2016 +0200

    Bug 768950 - TIFF private tags should not generate warnings.
    
    This is a regression from bug 131975. Any unknown tag over 32768 is not
    an error. This is a reserved zone where it is allowed to create custom
    tags.
    The warning indeed changed since libtiff 4.0.0alpha where it has become:
    "Unknown field with tag %d (0x%x) encountered"
    This explains why it was not recognized anymore.
Comment 5 Paul Barter 2016-07-23 17:13:03 UTC
Many thanks for the explanation.