Exporting invalid tiffs: Missing required "ImageLength" field - maybe triggered by Exif data in the original file
GIMP version: 2.10.12
Operating System: Windows 7
Package: Installer from gimp.org
Description of the bug
Exported tiff files are sometimes invalid. Not even Gimp itself can open them.
The bug is consistently reproducible for some XCF files, while others work just fine. It happens consistently with this attached XCF file. It was originally two layered photographs that have never been edited outside Gimp. Replaced them with dummy content as I can't upload the originals due to copyright.
- Opened the attached XCF file.
- Exported as tiff with settings as in this screenshot. The export appears to complete successfully. You can get the tiff file here
- Windows' file explorer shows the thumbnail with the content of the layers correctly, but the alpha background has become black. This may be another bug that I'll submit at a later point.
- Attempted to open the tiff in Gimp
Expected the image to open correctly, maybe with a dialog asking me which tiff layers to import.
The dialog to choose layers to import shows up. Curiously showing three pages, when there were only two layers. Also, this error message shows up in the error console:
TIFF image Warning TIFF directory is missing required "ImageLength" field
After clicking Import several more error messages show up:
TIFF image Warning TIFF directory is missing required "ImageLength" field TIFF image Warning Could not get image width from 'C:\Users\Jesper Henriksen\Documents\Gimp tiff feil\test.tiff' GIMP Error Opening 'C:\Users\Jesper Henriksen\Documents\Gimp tiff feil\test.tiff' failed: TIFF image plug-in could not open image
Trying to open the image in Windows' own photo viewer also fails, with a message that the file may be damaged, corrupt or too large (I get the message in Norwegian, not sure of the exact English translation). Opening in Paint, LibreOffice Draw and Photoshop Elements works but only shows the bottom layer. Don't know if that's normal behavior for multi-layer tiffs.