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

QImage ignore headers of jpg files

XMLWordPrintable

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

      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.

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes