Bug 492121

Summary: Focus point not rotated for portrait
Product: [Applications] digikam Reporter: Jérôme DEMEULLE <jdemeulle.photo>
Component: Metadata-FocusAssignee: Digikam Developers <digikam-bugs-null>
Status: REPORTED ---    
Severity: normal CC: caulier.gilles, Keith_Rhodes, metzpinguin
Priority: NOR    
Version First Reported In: 8.5.0   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: screen shot of the observed result
Portrait photo from memory card
Portrait photo (from DK) with focus at top

Description Jérôme DEMEULLE 2024-08-24 08:59:03 UTC
Created attachment 172905 [details]
screen shot of the observed result

SUMMARY
Show Focus Point seems to be not rotated.

STEPS TO REPRODUCE
I don't test it to reproduce it  but it should failed woth next 
1. Take a photo in portrait with the focus point at top or bottom
2. Download it in DK
3. Observe the photo in Preview or LithgTable with "Show Focus Point"
 
OBSERVED RESULT
The Focus Point is outside the photo (see screen shot attached)

EXPECTED RESULT
The Focus Point need to be rotated as weel as the photo

SOFTWARE/OS VERSIONS
Windows 10 Version 22H2 (x86_64)

ADDITIONAL INFORMATION
Build date: 23/08/2024 13:01 (target: RelWithDebInfo)
Revision: 5b93c59f5372d8c551264d4241168c4f753cf7b2
Branch: master

Camera :  Sony DSC-RX10M4
Comment 1 Jérôme DEMEULLE 2024-08-24 09:04:28 UTC
(Not shure of the component)
Comment 2 Maik Qualmann 2024-08-24 10:43:05 UTC
I cannot reproduce the problem here with Nikon portrait photos. Were the images subsequently rotated? We need a sample image in the original from the camera and after import when the problem occurs.

Maik
Comment 3 Jérôme DEMEULLE 2024-08-25 11:20:36 UTC
Created attachment 172935 [details]
Portrait photo from memory card

Portrait photo (memory card) with focus at top
Comment 4 Jérôme DEMEULLE 2024-08-25 11:23:54 UTC
Created attachment 172936 [details]
Portrait photo (from DK) with focus at top

Portrait photo (after import into DK) with focus at top.
The only transformation are file name rennaming and auto-creation of album with a custom date format
Comment 5 Jérôme DEMEULLE 2024-08-25 11:45:37 UTC
(In reply to Maik Qualmann from comment #2)
> I cannot reproduce the problem here with Nikon portrait photos. Were the
> images subsequently rotated? We need a sample image in the original from the
> camera and after import when the problem occurs.
> 
> Maik

Yes Images are correctly rotated.
Please find two attached file with the first fiel coming direcly from the memory card and the second after import.
In preview mode, show the focus point, it is outside the photo. Rotated it clockwise, the focus point disappear (https://bugs.kde.org/show_bug.cgi?id=492123 it's also the same behaviour with preview mode). Force to it to be shown again (select another photo and come back on the first or unactive/active the ShowFocusPoint, it is still at the same place (did not rotated with the photo) but it is now at the right place.
Rotate counterclockwise to have the photo in portrait back, the focus point change form (a small rectangle instead a square) in a new place inside the photo (but not correct place). Unactive/active the ShowFocusPoint, it come back to the first position (outside the photo without rotation)
Comment 6 Maik Qualmann 2024-08-25 20:21:54 UTC
Git commit 332dbaaa90d50aad3461eacc2ab8a0e5a49b4247 by Maik Qualmann.
Committed on 25/08/2024 at 20:20.
Pushed by mqualmann into branch 'master'.

better handle EXIF rotated images for focus point
It is difficult to handle images with pixel rotation
because we no longer know the original orientation.

M  +12   -5    core/utilities/focuspointmanagement/focuspointgroup_p.cpp

https://invent.kde.org/graphics/digikam/-/commit/332dbaaa90d50aad3461eacc2ab8a0e5a49b4247
Comment 7 caulier.gilles 2025-04-11 18:13:43 UTC
Hi,

The 8.7.0 pre-release Windows installer from today have been rebuilt from
scratch with Qt 6.8.3, KDE 6.12, OpenCV 4.11 + CUDA support, Exiv2 0.28.5, ExifTool 13.27, ffmpeg 7, all image codecs updated to last version (jxl, avif, heif, aom, etc.).

Please try with this version to see if your problem still reproducible...

https://files.kde.org/digikam/

Thanks in advance
Best regards

Gilles Caulier
Comment 8 Maik Qualmann 2025-09-17 20:26:32 UTC
*** Bug 509618 has been marked as a duplicate of this bug. ***
Comment 9 Maik Qualmann 2025-09-23 19:59:25 UTC
Git commit 522c6e2127ff2ec34a5382289474dda9fcacdeef by Maik Qualmann.
Committed on 23/09/2025 at 19:58.
Pushed by mqualmann into branch 'master'.

better handling of focus point rotation

M  +5    -0    core/libs/metadataengine/focuspoint/focuspoints_extractor_canon.cpp
M  +5    -0    core/libs/metadataengine/focuspoint/focuspoints_extractor_fujifilm.cpp
M  +7    -0    core/libs/metadataengine/focuspoint/focuspoints_extractor_nikon.cpp
M  +5    -0    core/libs/metadataengine/focuspoint/focuspoints_extractor_olympus.cpp
M  +5    -0    core/libs/metadataengine/focuspoint/focuspoints_extractor_panasonic.cpp
M  +3    -3    core/utilities/focuspointmanagement/focuspointgroup.cpp
M  +7    -1    core/utilities/focuspointmanagement/focuspointgroup_p.cpp

https://invent.kde.org/graphics/digikam/-/commit/522c6e2127ff2ec34a5382289474dda9fcacdeef
Comment 10 caulier.gilles 2025-12-07 06:36:50 UTC
@ Jérôme

This file is fixed with digiKam 8.8.0 ?

Gilles Caulier
Comment 11 caulier.gilles 2025-12-21 15:32:51 UTC
Jérôme,

Did you seen my last comment ?

Gilles Caulier