Bug 461205 - HEIF images are not rotated properly
Summary: HEIF images are not rotated properly
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-DImg-HEIF (other bugs)
Version First Reported In: 7.8.0
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-30 13:32 UTC by Axel Schwank
Modified: 2023-01-08 07:48 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 7.10.0
Sentry Crash Report:


Attachments
HEIC image (shows correct thumbnail, imported with digikam 7.1.0) (2.28 MB, image/heif)
2022-10-30 13:32 UTC, Axel Schwank
Details
HEIC image (shows incorrect thumbnail, imported with digikam 7.8.0) (592.87 KB, image/heif)
2022-10-30 13:34 UTC, Axel Schwank
Details
JPEG image (shows correct thumbnail, imported with digikam 7.8.0) (3.45 MB, image/jpeg)
2022-10-30 13:35 UTC, Axel Schwank
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Axel Schwank 2022-10-30 13:32:52 UTC
Created attachment 153326 [details]
HEIC image (shows correct thumbnail, imported with digikam 7.1.0)

SUMMARY
HEIF images are not rotated properly according to their EXIF orientation unlike a (almost) comparable JPEG images.
I provide three images to compare: two HEIF images (HEVC codec), X dimension larger than Y dimension and orientation tag of 6 (which is commonly displayed as "Rotate 90 CM" or "top, right") and an JPEG image with the same properties regarding these aspects.
The JPEG image is displayed correctly (portrait) whereas the HEIF image is not (landscape). I guess the will be no difference in the HEIF images when they are imported, the reason why I provide two is that one of them (IMG_0770.heic) was imported with digikam 7.1.0 in my installation which generated a correctly oriented thumbnail (but shows an incorrect orientation of the preview image), whereas IMG_864.heic was imported with digikam 7.8.0 where both thumbnail and preview are wrong. So it seems there is a change in behaviour.
 Gwenview and the dolphin preview show everything fine.


STEPS TO REPRODUCE
1. Import HEIF image with orientation 6 (example provided)

OBSERVED RESULT
Wrong orientation (landscape)

EXPECTED RESULT
Correct orientation (portrait)

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: openSuSE Tuwbleweed 20221014
(available in About System)
KDE Plasma Version: 5.26.0
KDE Frameworks Version: 5.99.0
Qt Version: 5.15.6

ADDITIONAL INFORMATION
Comment 1 Axel Schwank 2022-10-30 13:34:15 UTC
Created attachment 153327 [details]
HEIC image (shows incorrect thumbnail, imported with digikam 7.8.0)
Comment 2 Axel Schwank 2022-10-30 13:35:27 UTC
Created attachment 153328 [details]
JPEG image (shows correct thumbnail, imported with digikam 7.8.0)
Comment 3 Maik Qualmann 2022-10-30 13:46:07 UTC
Error has already been reported.  Since newer digiKam versions use the libheif installed in the system, the problem will not be fixed until openSUSE switches to libheif-1.13.

Maik
Comment 4 Maik Qualmann 2023-01-08 07:48:09 UTC
On openSuSE Tumbleweed, libheif is now at version 1.14. The problem of incorrectly rotated HEIF images is now resolved.

Maik