Bug 513721

Summary: Metadata is modified when saving after a simple crop in Image Editor.
Product: [Applications] digikam Reporter: kde
Component: Metadata-EngineAssignee: Digikam Developers <digikam-bugs-null>
Status: REPORTED ---    
Severity: major CC: caulier.gilles, metzpinguin
Priority: NOR    
Version First Reported In: 8.8.0   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Example of modified metadata
MakerNotes is way off

Description kde 2025-12-22 20:45:35 UTC
Created attachment 187881 [details]
Example of modified metadata

SUMMARY
Metadata in MakerNotes and ExiTool panes are different after cropping in Image Editor. Some I may understand (like FOV) other I can't (Flash Type oe Hyperfocal distance for instance).

STEPS TO REPRODUCE
1. Open a picture in Image Editor (Tools / Image Editor)
2. Transform / Aspect Ratio Crop
3. Save
4. Compare both files metadata in DigiKam

OBSERVED RESULT
There are differences (other than file dimansion, size, orientation and other physical properties).

EXPECTED RESULT
Photographic context metadat should not change

SOFTWARE/OS VERSIONS
digiKam: 8.8.0
KDE Frameworks: 6.17.0
Qt: Using 6.9.1 and built against 6.9.1
Windows 11 Version 25H2
Build ABI: x86_64-little_endian-llp64
Kernel: winnt 10.0.26200

ADDITIONAL INFORMATION
Example of original and cropped pictures
https://1drv.ms/f/c/53e1164d5c2acbaf/IgCUwtB9oun-RIwD2yv7XZA2AfLlPu1IPYtPgxNjqVbRHtE?e=0KQszS
Comment 1 kde 2025-12-22 20:46:46 UTC
Created attachment 187882 [details]
MakerNotes is way off
Comment 2 Maik Qualmann 2025-12-22 21:09:09 UTC
Exiv2 has a serious error with the "original" image:

digikam.metaengine: Exiv2 ( 3 ) :  Directory Canon with 13312 entries considered invalid; not read.

Internally, we still use Exiv2 to decode the metadata.
The image appears to have already been processed by another program.
Comment metadata added? By which program?

Maik
Comment 3 kde 2025-12-23 17:42:17 UTC
The only program I could think of is WLPG. So this sounds like another problem I read about which, if I remember correctly, was that the MakerNotes byte order was different than expected... Could it help my situation if I enabled everything related to ExifTool?
Also, if it is simply not read, why would values change?
Comment 4 kde 2025-12-27 21:00:41 UTC
This is the other place I was talking about.
https://exiftool.org/forum/index.php?topic=11264.0