Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
None
-
6.5.3
-
None
-
iPad 6th generation, iPadOS version 17.2
Description
From the Qt Maintenance Tool I added the additional library Qt Image Formats (version 6.5.3-0-202309260341) on my mac device to have support for HEIF images in iOS.
With the following code I want to load a heif picture from my gallery, but when I select one in portrait mode it becomes rotated by 90° and by printing width and height I assume that there is a problem in reading/applying the orientation metadata.
Here is my example code:
const QStringList locations = QStandardPaths::standardLocations(QStandardPaths::PicturesLocation); const QString location = locations.isEmpty() ? "" : locations.last(); const QString file = QFileDialog::getOpenFileName(nullptr, "Choose a picture", location, "Image files (*.heic *.HEIC *.heif *.HEIF)"); QFile imageFile(file); if (imageFile.open(QIODevice::ReadOnly)) { const QImage image = QImage::fromData(imageFile.readAll()); qDebug() << "Image width:" << image.width() << "- height:" << image.height(); }