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

QImage ignore headers of jpg files

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • None
    • 5.3.2
    • Image formats
    • None

    Description

      1) Open http://doc.qt.io/qt-4.8/qimage.html, read "If the format is not specified (which is the default), the loader probes the file for a HEADER to guess the file format.".
      2) Load any jpg file, and rename to "test.png".
      3) Run simple test:

      #include<QImage>
      #include<cassert>
      
      int main(int argc, char *argv[])
      {
          QImage test("test.png");
          assert(!test.isNull());
          return 0;
      }
      

      In result - SIGABRT. If rename file to "test.jpg" or "test", SIGABRT signal don't show. In other words, if file have extension, QImage ignore file header. And manual don't have a single word about it.

      Attachments

        Issue Links

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

          Activity

            People

              vgt Eirik Aavitsland
              strelok Strelok
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes