Bug 424758

Summary: Face Tags on Samsung photos are rotated 180 degrees
Product: [Applications] digikam Reporter: Dan Kozlowski <cartman005>
Component: Maintenance-FacesAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: normal CC: dylan.fairbairn, metzpinguin
Priority: NOR    
Version First Reported In: 7.0.0   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In: 7.1.0
Sentry Crash Report:
Attachments: Example of image with face tags rotated 180 in DigiKam
Example of image with face tags rotated 180 in DigiKam

Description Dan Kozlowski 2020-07-28 15:30:46 UTC
Created attachment 130460 [details]
Example of image with face tags rotated 180 in DigiKam

SUMMARY
Face Tags are rotated 180 degrees between digiKam and WLPG. This seems to only occur with photos taken with a Samsung camera. Perhaps there is an issue with the orientation flag? All other images are showing tags in the correct location as of version 7.0.

STEPS TO REPRODUCE
1. Add face tags to a photo taken with a Samsung phone using Windows Live Photo Gallery
2. Open the photo in digiKam.
3. The face tags will be shown 180 degrees from where they were tagged in WLPG.
4. Fix the tags in digiKam.
5. Open the photo in WLPG.
6. The face tags will be shown 180 degrees from where they were tagged in digiKam.

OBSERVED RESULT
Face tags are rotated 180 degrees between digiKam and WLPG.

EXPECTED RESULT
Face tags in the same location in both applications.


SOFTWARE/OS VERSIONS
Windows: 10
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Dan Kozlowski 2020-07-28 15:31:21 UTC
Created attachment 130461 [details]
Example of image with face tags rotated 180 in DigiKam
Comment 2 Maik Qualmann 2020-07-28 16:39:00 UTC
Windows Live Photo Gallery makes the mistake here. A test with Picasa shows that digiKam and Picasa show the face rectangle that is in the image in the same place. DigiKam, like many other programs, has followed the quasi-standard of interpreting the face rectangle against the unaligned image since 7.0.0. There is no information in the facial data which orientation is assumed. The Windows Live Photo Gallery incorrectly saves the face rectangles against the aligned image (like digiKam used to). So bug report to Microsoft.

Your opportunity, rotate the images losslessly and set the orientation flag to normal.

Maik
Comment 3 Dan Kozlowski 2020-07-28 16:42:27 UTC
Understood. Thank you for taking the time to investigate this!
Comment 4 Dylan 2020-08-28 13:23:56 UTC
I also ran into this problem, but for a large number of files - it seems it is a well known problem with a solution as outlined here
https://intellitect.com/exiftool-people-tag-recovery/