Bug 517665 - Writing metadata to JPG fails with Exiv2 error, even if digikam is set to use Exiftool to write metadata to files
Summary: Writing metadata to JPG fails with Exiv2 error, even if digikam is set to use...
Status: RESOLVED DUPLICATE of bug 468830
Alias: None
Product: digikam
Classification: Applications
Component: Metadata-Engine (other bugs)
Version First Reported In: 9.0.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-03-16 20:00 UTC by FeikeEU
Modified: 2026-03-16 20:37 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description FeikeEU 2026-03-16 20:00:19 UTC
SUMMARY

On some JPG images, face tags are not saved into the file.

This happens EVEN if I've set digikam to use Exiftool to write metadata to file, e.g. as per this thread: 
https://bugs.kde.org/show_bug.cgi?id=448729

Because of the error (as below) it seems none of the metadata changes are saved into the file, but I only tag faces (and want them to be written to the file)

DebugView shows this error:
digikam.metaengine: Cannot export changes with Exiv2 backend:   (Error # 38 :  "Size of XMP JPEG segment is larger than 65535 bytes"


STEPS TO REPRODUCE
1. Open a 'problematic JPG' in digikam
2. Apply a facetag
3. Observe (in another tool) that the facetag has not been written to the file
3. Observe (in DebugView) that digikam threw this error:
digikam.metaengine: Cannot export changes with Exiv2 backend:   (Error # 38 :  "Size of XMP JPEG segment is larger than 65535 bytes"
 digikam.metaengine: Exiv2 error exception for "<filename>.jpg" Writing of metadata aborted!


OBSERVED RESULT
Face tag has not been written to the JPG file

EXPECTED RESULT
Face tag is written into the JPG file

SOFTWARE/OS VERSIONS
Windows: Windows 11 Version 25H2 (x86_64)
Qt Version: 6

ADDITIONAL INFORMATION
Comment 1 FeikeEU 2026-03-16 20:02:43 UTC
PS: 
I noticed 'by accident' that writing the face tags into some files...
Perhaps a warning should be shown is metadata is not saved into the file?

(I make a point of storing [whereever possible]  metadata into the file, as to not get 'stuck' into a particular tool. So it's important to me that my efforts to e.g. set GPS coordinates, or tag faces, really are written into the file...)
Comment 2 caulier.gilles 2026-03-16 20:05:39 UTC
The ExifTool Backend is only used to read and write metadata to files. Internally, digiKam continue to encode and decode metadata with Exiv2 containers so this kind of error still possible. 

Note: ExifTool support the Exiv2 containers to stream metadata.

Gilles Caulier
Comment 3 FeikeEU 2026-03-16 20:18:31 UTC
(In reply to caulier.gilles from comment #2)
> The ExifTool Backend is only used to read and write metadata to files.
> Internally, digiKam continue to encode and decode metadata with Exiv2
> containers so this kind of error still possible. 
> 
> Note: ExifTool support the Exiv2 containers to stream metadata.
> 
> Gilles Caulier

Thanks for you quick response!
So... for images where 'XMP JPEG segment is larger than 65535 bytes' metadata can simply not be written to the file?

(Note: I really LOVE digikam and am VERY grateful all the efforts all contributors are putting in!! Just trying to get 'clarity;  :-))
Comment 4 caulier.gilles 2026-03-16 20:24:58 UTC
yes exactly. The bug is located in Exiv2, and already reported since a while and not yet fixed:

https://github.com/Exiv2/exiv2/issues/1549
Comment 5 Maik Qualmann 2026-03-16 20:37:15 UTC

*** This bug has been marked as a duplicate of bug 468830 ***