Bug 464003 - digiKam fills "ASCII" as photo caption from no apparent sources
Summary: digiKam fills "ASCII" as photo caption from no apparent sources
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Metadata-Engine (show other bugs)
Version: 7.9.0
Platform: Debian unstable Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-08 14:09 UTC by Hieu Van
Modified: 2023-01-10 04:44 UTC (History)
2 users (show)

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


Attachments
The photo in question (1.30 MB, image/jpeg)
2023-01-08 14:09 UTC, Hieu Van
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hieu Van 2023-01-08 14:09:04 UTC
Created attachment 155111 [details]
The photo in question

SUMMARY
Whenever I import an photo taken with my Xiaomi Mi A1 (using Open Camera 1.50.1), digiKam always sets the caption of the photos to "ASCII". I can't found such field when parsing the photos with exiftool. IIRC, the "ASCII" string seems to come from an EXIF tag related to GPS.

STEPS TO REPRODUCE
1. Import the attached photo using whatever method (direct move/copy or via import tool)

OBSERVED RESULT
Right after importing, the photos has the caption "ASCII"

EXPECTED RESULT
The photos shouldn't have captions

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Debian unstable (bookworm/sid)
(available in About System)
KDE Plasma Version: 5.26.4
KDE Frameworks Version: 5.101.0
Qt Version: 5.15.6

ADDITIONAL INFORMATION
This bug is related to a bug I submitted from a year ago: #447370
Comment 1 Maik Qualmann 2023-01-08 14:36:42 UTC
*** This bug has been marked as a duplicate of bug 447370 ***
Comment 2 Maik Qualmann 2023-01-08 15:16:02 UTC
The problem has nothing to do with GPS tags.
The entry is interpreted by Exiv2 from Exif.Image.ImageDescription (user comment). Exiv2 only displays the charset encoding info (ASCII) at the beginning of the comment. ExifTool decodes the entry as "Yaw:152.63072,Pitch:-9.293301559750724,Roll:3.3785892861867524".
I see in your file that there is no null byte before the "ASCII" string, I can't say for sure if that is the cause. Exiv2 may have to be a little more tolerant in the interpretation here. The problem can be reproduced with the Exiv2 CLI tool. You should report the problem to Exiv2 with the example image.

Maik
Comment 3 caulier.gilles 2023-01-08 16:00:46 UTC
Maik,

With 8.0.0, perhaps this case can be solved to use ExifTool instead Exiv2 ?

Gilles
Comment 4 Maik Qualmann 2023-01-08 16:14:32 UTC
With digiKam-8.0.0 we only read the metadata with ExifTool into an EXV QByteArray that is decoded with Exiv2 when a warning or error occurs with Exiv2. The image does not produce a warning or error. I forced reading with ExifTool as a test, then the Exif user comment would be correct.
Hmm, should we create an option in the setup to always read the metadata with ExifTool? In terms of performance, it would certainly be worse.

Maik
Comment 5 caulier.gilles 2023-01-08 16:20:49 UTC
Good Q. I don't know yet, as the future of Exiv2 project is uncertain. I hope now. We will see if somebody respond to the UPSTREAM bug. Last stable was release more than one year ago...

Gilles
Comment 6 Hieu Van 2023-01-09 07:44:27 UTC
Thanks for your insights, guys. I found out that it was a problem with Open Camera, not digiKam nor exiv2. Its devs probably missed the termination character in user comment tag