Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.8.1
-
None
Description
I use the BMP format as an easy option to save and load intermediate images fast. Some of my images are rather large, and while they are successfully saved by QImage, they fail to be loaded back.
I'm attaching an example project (256.4MiB when uncompressed!) with two BMP files: one, 512×512px, is loaded successfully, while another, 16385×16384, fails to be loaded with a rather puzzling message: "Unable to read image data".
The limit was imposed in 621ab8ab59901cc3f9bd98be709929c9eac997a8 with the following rationale:
> Make the decoder fail early to avoid spending time and memory on
> attempting to decode a corrupt image file.
But if the image is not compressed, it's rather easy to check whether the size in the header is sensible: just use the file size. So please let Qt load large BMPs at least if they are uncompressed.