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
*** This bug has been marked as a duplicate of bug 447370 ***
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
Maik, With 8.0.0, perhaps this case can be solved to use ExifTool instead Exiv2 ? Gilles
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
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
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