Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
6.7
-
None
Description
When using `QImageReader` to read image files, if the resulting image is larger than the set (or default) allocation limit, the read fails. The terminal output does show that the reading has failed due to the allocation limit ("qt.gui.imageio: QImageIOHandler: Rejecting image as it exceeds the current allocation limit of XX megabytes") but the caller only gets the error enum value `QImageReader::InvalidDataError` - which could be any number of things (AFAIU) including corrupted image data.
For applications that want to implement functionality similar to GIMP, where loading an image that is "too big" causes a message dialog asking for permission to increase the limit (instead of just failing), it would be very useful if there was a specific `QImageReader::ImageReaderError` enum value for the allocation limit error.