File corruptuion when trying to export large TIFF
Environment/Versions
- GIMP version: 2.10.18
- Package: deb from Ubuntu Focal Fossa
- Operating System: GNU/Linux 64 bit
Description of the bug
When trying to export a large image as TIFF (I expect it to be a BigTIFF), I get this error in the log:
** (file-tiff:7088): CRITICAL **: 09:20:03.738: Directory SubImage1 with 18761 entries considered invalid; not read.
Reproduction
Always happens
Reproduction steps:
- Load a TIFF (should probably be greater than 4 G). My example is 43200x29393 px. One channel float, that is 4 byte per pixel.
- Export the image
Expected result: Non-corrupted data
Actual result: Corrupted data
Additional information
I have not done any debugging, but it is close to #8196. Since GIMP need to write BigTIFF in this case, this issue may be different. However, it is not impossible that there are faulty size computations here as well.