Bug 451374 - When changing image orientation to portrait in DNG file, the change does not seem to get written to file metadata.
Summary: When changing image orientation to portrait in DNG file, the change does not ...
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Metadata-Orientation (show other bugs)
Version: 7.5.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-10 19:03 UTC by Jaakko Oksa
Modified: 2022-03-10 21:13 UTC (History)
2 users (show)

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


Attachments
Relevant settings. (41.60 KB, image/png)
2022-03-10 19:03 UTC, Jaakko Oksa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jaakko Oksa 2022-03-10 19:03:15 UTC
Created attachment 147426 [details]
Relevant settings.

SUMMARY
The orientation/write flag to metadata -setting is enabled. When changing DNG file from landscape to portrait, the modified-timestamp of the file changes, but Exiftool still reports Orientation : Horizontal (normal). So, apparently, SOMETHING is written to the file, but not the orientation value. 

STEPS TO REPRODUCE
1. Open DNG file
2. Rotate right
3. Check Orientation: metadata field with Exiftool, it still says: Horizontal (normal).

OBSERVED RESULT
When rotating a DNG, the rotation information does not seem to get saved in file metadata.

EXPECTED RESULT
It ought to be saved to file metadata.

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

ADDITIONAL INFORMATION
I tried creating a copy of rotated (portrait) DNG file to different directory, and digiKam displays it in landscape, which verifies that orientation metadata was NOT written to file. I think digiKam displays the original file in portrait orientation, because it has saved the orientation to its own database, but it does NOT seem to get saved into the actual file, which means that other software show it in incorrect (original, landscape) orientation.
Comment 1 Maik Qualmann 2022-03-10 19:09:16 UTC
Have you also enabled writing of metadata specifically in DNG files in the metadata settings?

Maik
Comment 2 Jaakko Oksa 2022-03-10 19:19:35 UTC
(In reply to Maik Qualmann from comment #1)
> Have you also enabled writing of metadata specifically in DNG files in the
> metadata settings?
> 
> Maik

Yes, the Write metadata to DNG files -setting is enabled. Also, writing other metadata (tags, ratings) has always worked, because they are shown in Windows explorer when I view the contents of a directory in details-mode.
Comment 3 Maik Qualmann 2022-03-10 19:27:39 UTC
Hmm, when I run it via Item->Adjust Exif Orientation, the flag is written, apparently not when rotated via the overlay buttons.

Maik
Comment 4 Maik Qualmann 2022-03-10 20:43:49 UTC
Git commit f17e363120be39699ca432dbd2b3edc6974ae946 by Maik Qualmann.
Committed on 10/03/2022 at 20:42.
Pushed by mqualmann into branch 'qt5-maintenance'.

write orientation flag in DNG files when image is rotated
FIXED-IN: 7.7.0

M  +2    -1    NEWS
M  +3    -2    core/libs/fileactionmanager/fileworkeriface.cpp

https://invent.kde.org/graphics/digikam/commit/f17e363120be39699ca432dbd2b3edc6974ae946
Comment 5 Jaakko Oksa 2022-03-10 21:13:25 UTC
(In reply to Maik Qualmann from comment #4)
> Git commit f17e363120be39699ca432dbd2b3edc6974ae946 by Maik Qualmann.
> Committed on 10/03/2022 at 20:42.
> Pushed by mqualmann into branch 'qt5-maintenance'.
> 
> write orientation flag in DNG files when image is rotated
> FIXED-IN: 7.7.0
Thanks! That was a quick response :-) I am going to download the 7.7.0 when it is released, until then I am going to use the menu item and not the overlay buttons to rotate images.