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

QImage not loading simple heic file

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P1: Critical
    • 6.7.3, 6.8.0 RC, 6.9.0 FF
    • 6.7.2, 6.8.0 Beta1
    • Image formats
    • None
    • MacOS Sonoma 14.5
    • macOS
    • 929698e7f (dev), 3158a940d (6.8), 321566cf1 (6.7)

    Description

      Qt 6.7.2 works for most heic files, but not the basic version attached.  Prior Qt versions do work.

      Minimal test example (files included):

      minimalimageviewer.pro

       

      QT = core widgets
      SOURCES += main.cpp 

      main.cpp

       

      #include <QtWidgets/QtWidgets>
      int main(int argc, char *argv[]) {
          QApplication app(argc, argv);
          QString path = "/Users/roryhill/Pictures/_ThumbTest/notworking/Heic1.heic";
          QImage image(path);
          QLabel label;
          if (image.isNull()) {
               label.setText("Failed to load " + path);                                  
               label.setFixedSize(QSize(800, 200));
          }
          else {
               label.setPixmap(QPixmap::fromImage(image));                                
               label.setFixedSize(image.size());
          }
          QString qtVersion = QT_VERSION_STR;
          label.setWindowTitle("HEIC Image Viewer    Qt Version " + qtVersion);
          label.setAlignment(Qt::AlignCenter);
          label.show();
          return app.exec();
      } 

       

      SAMPLE OUTPUT: 1st from Qt 6.7.1, then Qt 6.7.2

      Attachments

        1. 1.png
          1.png
          1.33 MB
        2. 2.png
          2.png
          54 kB
        3. Heic1.heic
          873 kB
        4. main.cpp
          0.7 kB
        5. MinimalImageViewer.pro
          0.0 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            vgt Eirik Aavitsland
            rory Rory Hill
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes