mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2026-10-18 13:28:48 -04:00
read_orientation_helper() mapped the irot/imir properties to an EXIF orientation with a list of conditions that misses several combinations, e.g. a 90 degrees counterclockwise rotation followed by a mirroring, which is how iPhone front-camera photos are stored. For those it still returned true, so libheif was told to ignore the transformations while Qt got no orientation either, and the image was shown sideways. The orientation is now chosen by a switch on the rotation and, in each case, on the mirroring, which is applied after the rotation as MIAF requires. Other rotation values are left to libheif. The new read tests cover the twelve rotation and mirroring combinations, named like the AVIF ones. All of them display the same picture (colored corners and an "F"): the stored pixels are that picture with the transformations undone, written as uncompressed HEIF with libheif. Four of them fail without this change.
4.8 KiB
4.8 KiB