GNOME Bugzilla – Bug 434025
warn before opening a very large image file
Last modified: 2018-05-24 12:11:51 UTC
From Debian bug report http://bugs.debian.org/421153:
When opening a very large file (e.g. http://imgsrc.hubblesite.org/hu/db/2007/06/images/c/formats/full_jpg.jpg), GIMP will most likely try to create a very large swap file at once, which will usually make the user's desktop unresponsive for a while. The max-new-image-size setting only seems to affect scaling & new images, but not opening existing images.
Surely it should be possible to guesstimate whether a given file will exceeed max-new-image-size? Especially since the size of the file itself will generally be smaller than the amount of memory it will use when opened, depending on the format.
Hmm, not sure if that's desirable at all. It would definitely be difficult to implement as it would require substantial changes to the file plug-in API. I suggest closing as WONTFIX.
The only reasonable way to implement this with the given plug-in API seems to be to implement it in each of the file plug-ins. I don't see how it could be done without touching every file plug-in.
*** Bug 380028 has been marked as a duplicate of this bug. ***
It may require touching every file plug-in, but it is an interesting improvement anyway. Just looking at file size is not enough to allow the user to guess if the decompressed image (+ undo, projection and so on) will nicely fit in memory or if it will blow up the system. The comments in the Debian bug report are rather valid.
It may be wise to delay this change until the some parts of the new plug-in/PDB API are in place, though. Most plug-ins would have to be modified anyway, and we could think about adding a specific trigger for the image size. So maybe we could add this to the tracking bug #101604?
Changing version to "Current SVN" as this request is not specific to any
-- GitLab Migration Automatic Message --
This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.
You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gimp/issues/243.