Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-135059

BMP files larger than 256Mpx can't be loaded

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.8.1
    • Image formats
    • 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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            vgt Eirik Aavitsland
            10110111 Ruslan Kabatsayev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes