Gwenview stopped loading large image files

Hi,

I sometimes have to open large image files and before the upgrade to Plasma 6, gwenview would open the files with no problem.

Now when I open a large file I get:

The file is 136Mb in size.

I’m using KDE Neon and Plasma 6.0.3.

Does anybody has this problem?
Thanks!

Can reproduce trying to load this 155MB image

Here’s the gwenview log from terminal:

gwenview "/home/luis/Downloads/On_Bicycles_Built_For_One. _Washington_D.C.,_June_30._The_Boy_Scout's_motto_of_ do_a_good_turn_daily _was_well_observed_by_these_Flint,_Mich.,_scouts,_John_Kleinnheksel,_and_Dave_Matthews,_LCCN2016871930.tif"
kf.i18n.kuit: "Unknown subcue ':whatsthis,' in UI marker in context {@info:whatsthis, %1 the action's text}."
org.kde.kdegraphics.gwenview.lib: Unresolved mime type  "image/x-mng"
org.kde.kdegraphics.gwenview.lib: Unresolved raw mime type  "image/x-samsung-srw"
qt.gui.imageio: QImageIOHandler: Rejecting image as it exceeds the current allocation limit of 256 megabytes
qt.gui.imageio: QImageIOHandler: Rejecting image as it exceeds the current allocation limit of 256 megabytes
gwenview -v    
gwenview 24.02.1
Operating System: Arch Linux 
KDE Plasma Version: 6.0.3
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.3
Kernel Version: 6.8.2-arch2-1 (64-bit)
Graphics Platform: Wayland
Processors: 12 × Intel® Core™ i7-9750H CPU @ 2.60GHz
Memory: 31.2 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 630

void QImageReader::setAllocationLimit(int mbLimit)

Sets the allocation limit to mbLimit megabytes. Images that would require a QImage memory allocation above this limit will be rejected. If mbLimit is 0, the allocation size check will be disabled.

At runtime, this value may be overridden by the environment variable QT_IMAGEIO_MAXALLOC.

So running like this QT_IMAGEIO_MAXALLOC=0 gwenview "/path/to/image.jpeg will disable that limit

1 Like

For completion, you can set that environment variable for the whole plasma session Session Environment Variables - KDE UserBase Wiki so you don’t have to run manually all the time

Thanks, I added the environment variable.

But there should be a more simple/clean way to define this, maybe a dialog box in gwenview, or some setting in kde settings.

Yes I also think this is a reasonable option to have, someone made a bug report about this before :slight_smile: 482195 – Gwenview fails to open large images