Bug 487114

Summary: Corruption on Save If Vertical Image Size Is Bigger Than 32767 (7FFF) for all file formats (PNG, PPM, XPM ...)
Product: [Applications] kolourpaint Reporter: ehdemirli
Component: generalAssignee: kolourpaint-support
Status: RESOLVED UPSTREAM    
Severity: normal CC: ehdemirli, kollix
Priority: NOR    
Version: 23.08.5   
Target Milestone: ---   
Platform: NixOS   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description ehdemirli 2024-05-16 19:03:57 UTC
SUMMARY
PPM file format 1700x37000 resolution corrupts the image file.

STEPS TO REPRODUCE
1. Open kolourpaint
2. Save the empty canvas as image.ppm
3. Ctrl+E (Resize)
4. set height to 37000
5. Save as ppm again
6. Close/Open Kolourpaint
7. Open the image.ppm and observe corrupted warning.

OBSERVED RESULT
Image corrupted

EXPECTED RESULT
Image not corrupted.

SOFTWARE/OS VERSIONS
Linux: NixOS 24.05.20240507.b211b39 (Uakari) x86_64
Comment 1 Martin Koller 2024-09-25 12:13:17 UTC
I found out that the image file itself is not corrupt, since e.g. gimp can still load it correctly.
It seems this is a problem with reading the file. Will investigate further.
Comment 2 Martin Koller 2024-09-25 13:08:10 UTC
This is a bug/limitation in Qt source code, already tracked here:
https://bugreports.qt.io/browse/QTBUG-82801