Bug 391970 - Bigger XCF / GIMP images failed to load
Summary: Bigger XCF / GIMP images failed to load
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kimageformats
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: 5.32.0
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Alex Merry
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-17 16:23 UTC by Bernd Lachner
Modified: 2018-05-02 00:11 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
XCF / GIMP file which don't load with the XCF KImageFormats plugin (1.11 MB, image/x-xcf)
2018-03-17 16:23 UTC, Bernd Lachner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bernd Lachner 2018-03-17 16:23:54 UTC
Created attachment 111466 [details]
XCF / GIMP file which don't load with the XCF KImageFormats plugin

It seems that the KImageFormat plugin for XCF / GIMP files can't handle bigger files correctly.

The file attached (16000x18000 pixels) at least, don't load in Digikam, Dolphin, Okular, Gwenview and Showfoto. Especially that its failed in Digikam is annoying for me. Even preview thumbnails can't be created. 

GIMP 2.8.18 handles this file without problems on my system. I use such large files for creating picture collages.
Comment 1 Christoph Feck 2018-03-30 15:17:41 UTC
The loader is currently limited to 16384 * 16384, because we had crashes with files that reported incorrect sizes. I didn't want to raise it to 32768 * 16384, because this would already overflow the allocatable size on 32-bit systems (2 GB).

On today's 64-bit systems, we probably can afford up to 65535 * 32768, which would amount to 8 GB.
Comment 2 Christoph Feck 2018-03-30 15:24:58 UTC
Correction: because of layer compositing, the loader actually allocates twice that amount, so 16K * 16K already needs 2 GB, while 32K * 32K would need 8 GB.
Comment 3 Christoph Feck 2018-04-26 22:07:12 UTC
https://phabricator.kde.org/D12557
Comment 4 Christoph Feck 2018-05-02 00:11:09 UTC
Git commit 19f33239e7a76697aa98af5428f0bbd9cfc7b740 by Christoph Feck.
Committed on 02/05/2018 at 00:10.
Pushed by cfeck into branch 'master'.

[XCF/GIMP loader] Raise maximimum allowed image size to 32767x32767 on 64 bit platforms

The GIMP image loader had a limit to 16K x 16K pixels, because this would
already exhaust the 2 GByte address space limit of 32 bit systems.

Remove this limit on 64 bit systems to allow the full 32K x 32K size.

Differential Revision: https://phabricator.kde.org/D12557

M  +2    -1    src/imageformats/xcf.cpp

https://commits.kde.org/kimageformats/19f33239e7a76697aa98af5428f0bbd9cfc7b740