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

QImage cannot load bitmap with pixel number bigger than 16384*16384

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.11.3, 6.4.0
    • Image formats
    • None
    • All

    Description

      Function 'read_dib_infoheader' in qbmphandler.cpp has a check on image size, and refuse to load it if width * height is bigger than 16384 * 16384:

      if (bi.biWidth <= 0 || !bi.biHeight || quint64(bi.biWidth) * qAbs(bi.biHeight) > 16384 * 16384)
          return false;

       Why ? where does the magic number 16384*16384 come from ? Windows' mspaint can create or load bitmap bigger than this limit.

      Here is the commit of this limit:

      https://github.com/qt/qtbase/commit/621ab8ab59901cc3f9bd98be709929c9eac997a8

      Attachments

        For Gerrit Dashboard: QTBUG-108281
        # Subject Branch Project Status CR V

        Activity

          People

            vgt Eirik Aavitsland
            zhu_hai Zhu Hai
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes