Bug 485009 - Exposure times greater or equal to 1 second are shown as a fraction in EXIF metadata view.
Summary: Exposure times greater or equal to 1 second are shown as a fraction in EXIF m...
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Metadata-Exif (other bugs)
Version First Reported In: 8.3.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-04 04:20 UTC by zeitler.georg
Modified: 2024-04-05 21:06 UTC (History)
1 user (show)

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


Attachments
incorrect display as a fraction (17.05 KB, image/jpeg)
2024-04-04 04:20 UTC, zeitler.georg
Details
correct display in seconds (15.23 KB, image/jpeg)
2024-04-04 04:21 UTC, zeitler.georg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description zeitler.georg 2024-04-04 04:20:27 UTC
Created attachment 168123 [details]
incorrect display as a fraction

***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

SUMMARY
After editing EXIF metadata, exposure times are shown as fraction "(x/1)" in EXIF metadata view if exposure times are larger than 1 second.

STEPS TO REPRODUCE
1.  Import unedited .jpg from Canon EOS 6D camera with an exposure time greater or equal to 1 second. In EXIF metadata view, the exposure time is correctly displayed in seconds, e.g. "x s".
2.  Edit any EXIF metadata field in digikam.
3.  Observe that now, the same exposure time in EXIF is shown as a fraction in brackets "(x/1).

OBSERVED RESULT
Exposure time is shown as a fraction "(x/1)".

EXPECTED RESULT
Exposure time is shown as "x s".


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

ADDITIONAL INFORMATION
Comment 1 zeitler.georg 2024-04-04 04:21:06 UTC
Created attachment 168124 [details]
correct display in seconds
Comment 2 Maik Qualmann 2024-04-04 06:13:44 UTC
The behavior is reproducible when Exiv2 is used as the metadata writing engine. The behavior does not occur with activated ExifTool for writing.

Maik
Comment 3 Maik Qualmann 2024-04-04 06:20:48 UTC
The behavior can only be reproduced with the metadata editor because we set the exposure time tag as a rational value.
ExifTool corrects it automatically.

Maik
Comment 4 zeitler.georg 2024-04-04 18:48:08 UTC
(In reply to Maik Qualmann from comment #3)
> The behavior can only be reproduced with the metadata editor because we set
> the exposure time tag as a rational value.
> ExifTool corrects it automatically.
> 
> Maik

I can confirm that switching to exiftool for writing the metadata solves the problem. Thanks!
Georg
Comment 5 Maik Qualmann 2024-04-05 21:06:21 UTC
Git commit 9808e33bd3ebbcda50ca18c73ea38c14749c846b by Maik Qualmann.
Committed on 05/04/2024 at 21:04.
Pushed by mqualmann into branch 'master'.

some Exif tags have to be written as unsigned rational values
FIXED-IN: 8.4.0

M  +1    -1    NEWS
M  +3    -3    core/dplugins/generic/metadata/metadataedit/exif/exifdevice.cpp
M  +3    -3    core/dplugins/generic/metadata/metadataedit/exif/exiflens.cpp
M  +4    -4    core/libs/metadataengine/dmetadata/dmetadata_libraw.cpp
M  +7    -0    core/libs/metadataengine/engine/metaengine.h
M  +22   -0    core/libs/metadataengine/engine/metaengine_exif.cpp

https://invent.kde.org/graphics/digikam/-/commit/9808e33bd3ebbcda50ca18c73ea38c14749c846b