Page MenuHomePhabricator

TIFF thumbnailer fails with a few IPTC profiles
Closed, InvalidPublic

Description

New problems detected with a few big TIFF (but not the biggest)

For example here:
https://commons.wikimedia.org/wiki/File:CH-NB_-_1802,_Zweite_Beschiessung_von_Z%C3%BCrich,_12._und_13._September_-_Collection_Gugelmann_-_GS-GUGE-KELLER-H-E-7.tif

But we have ~50 pictures of this category which are not thumbnailed at all:
https://commons.wikimedia.org/wiki/Category:CH-NB-Collection_Gugelmann

TheDJ posted the related log:
Error creating thumbnail: convert: /tmp/localcopy_7570ffa9a5d6-1.tif: wrong data type 7 for "RichTIFFIPTC"; tag ignored. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/706.
convert: /tmp/localcopy_7570ffa9a5d6-1.tif: Bogus "StripByteCounts" field, ignoring and calculating from imagelength. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/706.
convert: /tmp/localcopy_7570ffa9a5d6-1.tif: Read error at scanline 2357; got 11676 bytes, expected 21900. `TIFFFillStrip' @ error/tiff.c/TIFFErrors/496.

Remark: this bug was firstly reported here: https://phabricator.wikimedia.org/T54045#959148

Event Timeline

Kelson raised the priority of this task from to High.
Kelson updated the task description. (Show Details)
Kelson added a subscriber: Kelson.
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

This seems to be a bug in the libTIFF. Here is the upstream ticket:
http://bugzilla.maptools.org/show_bug.cgi?id=2273

The /tmp/localcopy_7570ffa9a5d6-1.tif: wrong data type 7 for "RichTIFFIPTC"; tag ignored. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/706. is probably a red herring.

However

convert: /tmp/localcopy_7570ffa9a5d6-1.tif: Bogus "StripByteCounts" field, ignoring and calculating from imagelength. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/706.
convert: /tmp/localcopy_7570ffa9a5d6-1.tif: Read error at scanline 2357; got 11676 bytes, expected 21900. `TIFFFillStrip' @ error/tiff.c/TIFFErrors/496.

Sounds more serious. But that seems unrelated to the linked upstream bug.

Also, the files in question seem to render now. Can I close this bug as resolved (presumably somewhere along the line we upgraded the image scalars)?

@Bawolff
I don't think the problem is fixed.

If you look here for example (first version of the picture):
https://commons.wikimedia.org/wiki/File:CH-NB_-_1802,_Zweite_Beschiessung_von_Z%C3%BCrich,_12._und_13._September_-_Collection_Gugelmann_-_GS-GUGE-KELLER-H-E-7.tif

You see that the original image still misses a thumbnail! The gallery is OK because lower resolution versions of these problematic pictures were uploaded over the older/highest resolution ones.

Oh, my bad. I didn't notice that they were uploaded over top of.

Are we sure that these files are even valid. Are there programs that can read these files?

TheDJ added a subscriber: TheDJ.

My Mac's Preview.app and GraphicConverter don't decode those original tiff files either and tiffinfo borks on it locally as well. I'm calling that these originals were broken.