Bug 520981 - XMP Exif metadata not loading correctly
Summary: XMP Exif metadata not loading correctly
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: File formats (other bugs)
Version First Reported In: 5.3.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Tiar
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-06-02 21:41 UTC by Tiar
Modified: 2026-06-22 11:08 UTC (History)
0 users

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


Attachments
Test file (2.22 MB, application/x-krita)
2026-06-02 21:41 UTC, Tiar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tiar 2026-06-02 21:41:16 UTC
Created attachment 192832 [details]
Test file

DESCRIPTION
In case of some files, the xmp exif metadata is not loaded correctly.
The test file comes from bug 495329

STEPS TO REPRODUCE
1. Open Log Viewer. Make sure "Metadata" logging is turned on in config.
2. Load the test file.


OBSERVED RESULT
Xmp.exif.FNumber gets the Invalid result because the parser can't parse the number with spaces.

EXPECTED RESULT
Xmp.exif.FNumber parses the number "32 / 10" correctly.


SOFTWARE/OS VERSIONS
Krita 5.3.2.
Comment 1 Dmitry Kazakov 2026-06-22 11:08:03 UTC
Git commit bc8a2a8d9fff009ea5cc7022daed1d1f8ea453a0 by Dmitry Kazakov, on behalf of Agata Cacko.
Committed on 22/06/2026 at 11:07.
Pushed by dkazakov into branch 'master'.

Fix not loading some xmp exif metadata correctly

Before this commit, Krita would not consider "32 / 10"
a valid value for a Rational field in XMP exif metadata.
Those files however exist in the wild and the regex to
accept the additional spaces isn't much different.
This commit changes the regex to accept possible spaces.

M  +1    -1    libs/metadata/kis_meta_data_parser.cc

https://invent.kde.org/graphics/krita/-/commit/bc8a2a8d9fff009ea5cc7022daed1d1f8ea453a0
Comment 2 Dmitry Kazakov 2026-06-22 11:08:14 UTC
Git commit 489a52258df9398850f6561b85d6f898c30ad806 by Dmitry Kazakov, on behalf of Agata Cacko.
Committed on 22/06/2026 at 11:07.
Pushed by dkazakov into branch 'master'.

Add KisUsageLogger logging for invalid metadata

Before this commit, invalid metadata would show up in LogViewer when
turned on metadata filter, but that caused a lot of lines and it
wouldn't be visible in the Krita usage log. This commit adds logging
into Krita Usage Log so failures to parse or save metadata are
leaving a trace in the log file.
Related: bug 520982

M  +11   -1    plugins/metadata/xmp/kis_xmp_io.cpp

https://invent.kde.org/graphics/krita/-/commit/489a52258df9398850f6561b85d6f898c30ad806
Comment 3 Dmitry Kazakov 2026-06-22 11:08:50 UTC
Git commit 656d07fa47d3bf485f224f1ca0d0d84a594b39dc by Dmitry Kazakov, on behalf of Agata Cacko.
Committed on 22/06/2026 at 11:08.
Pushed by dkazakov into branch 'krita/6.0'.

Fix not loading some xmp exif metadata correctly

Before this commit, Krita would not consider "32 / 10"
a valid value for a Rational field in XMP exif metadata.
Those files however exist in the wild and the regex to
accept the additional spaces isn't much different.
This commit changes the regex to accept possible spaces.

M  +1    -1    libs/metadata/kis_meta_data_parser.cc

https://invent.kde.org/graphics/krita/-/commit/656d07fa47d3bf485f224f1ca0d0d84a594b39dc
Comment 4 Dmitry Kazakov 2026-06-22 11:08:52 UTC
Git commit 5e541796a4ddfc2b3c266a5fda058c5489df4dc3 by Dmitry Kazakov, on behalf of Agata Cacko.
Committed on 22/06/2026 at 11:08.
Pushed by dkazakov into branch 'krita/6.0'.

Add KisUsageLogger logging for invalid metadata

Before this commit, invalid metadata would show up in LogViewer when
turned on metadata filter, but that caused a lot of lines and it
wouldn't be visible in the Krita usage log. This commit adds logging
into Krita Usage Log so failures to parse or save metadata are
leaving a trace in the log file.
Related: bug 520982

M  +11   -1    plugins/metadata/xmp/kis_xmp_io.cpp

https://invent.kde.org/graphics/krita/-/commit/5e541796a4ddfc2b3c266a5fda058c5489df4dc3