Bug 446363 - EXIF of image cannot be read on windows
Summary: EXIF of image cannot be read on windows
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Metadata-Exif (show other bugs)
Version: 7.3.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-02 09:25 UTC by wuye9036
Modified: 2023-10-29 07:44 UTC (History)
2 users (show)

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


Attachments
Exif Page (501.16 KB, image/jpeg)
2021-12-02 09:25 UTC, wuye9036
Details
ExifTool screenshot (651.78 KB, image/jpeg)
2021-12-02 09:25 UTC, wuye9036
Details

Note You need to log in before you can comment on or make changes to this bug.
Description wuye9036 2021-12-02 09:25:07 UTC
Created attachment 144139 [details]
Exif Page

There is no data to shown in EXIF page, but ExifTool page works well. I have tested the same image on latest official exvi2 executable, and everything works well. I have uploaded the screenshots of exif tab and exiftool tab.

The sample file is beyond the size limitation of attachment, plese contact me I could send the original file to you.

The photo was taken by NEX-5N, you may want to get some samples of the same camera from dpreview.

The missing metadata also affected the Dates album view. It used the time of image copying to instead the CreateDate that polluted my date view.
Comment 1 wuye9036 2021-12-02 09:25:44 UTC
Created attachment 144140 [details]
ExifTool screenshot
Comment 2 caulier.gilles 2021-12-02 09:40:17 UTC
In Exif metadata viewer, do you have any active filters ? Look on the top, there are a tool bar with a drop-down menu.

Gilles Caulier
Comment 3 Maik Qualmann 2021-12-02 12:44:59 UTC
I downloaded 3 samples from different websites and tested them on Windows. All Exif metadata is displayed. As Gilles says, check the filter (it's just a wrong custom filter). The same thing with your Exiftool Screenschot a filter is set, otherwise much more information is displayed. Otherwise we need a sample image from you.

Maik
Comment 4 wuye9036 2021-12-02 17:47:33 UTC
Sorry, I reproduced it with more details, and the conclusion is changed.
I think it is not caused by the original files. All metadata readout issues were occurred on symbolic links.
I have tried to extract metadata by Exiv2.exe on the symbolic link and it works well.

------------------------------

>exiv2json.exe "E:\Personal\Photos\Archives\2016SummerTrip\_DSC5190.dng" | grep "Date"
Error: Directory Sony2 with 25665 entries considered invalid; not read.
                        "DateTime": "2017:04:10 02:37:03",
                        "PreviewDateTime": "2017-04-10T02:37:02-07:00",
                        "PreviewDateTime": "2017-04-10T02:37:02-07:00"
                        "DateTimeOriginal": "2017:03:22 02:52:54",
                        "DateTimeDigitized": "2017:03:22 02:52:54",
                        "ModifyDate": "2017-04-10T02:37:03-07:00",
                        "CreateDate": "2017-03-22T02:52:54",
                        "MetadataDate": "2017-04-10T02:37:03-07:00",
                        "DateCreated": "2017-03-22T02:52:54"

>dir E:\Personal\Photos\Archives\2016SummerTrip | grep "5190"
12/01/2021  01:18 PM    <SYMLINK>      _DSC5190.dng [E:\OneDrive\Photos\Archives\2016SummerTrip\_DSC5190.dng]

>
Comment 5 Maik Qualmann 2021-12-02 20:01:01 UTC
There is a difference whether you execute it via the CMD or we do it via the API. Do not use symlinks on Windows. Current bug 446377 and wish here, read the post by Gilles.

Maik
Comment 6 wuye9036 2021-12-02 20:27:16 UTC
Thanks. But the tricky thing is the JPEG looks good even it is sym linked.
Do you have any plan that use ExifTool to instead Exiv2 in metadata engine?
Comment 7 Maik Qualmann 2021-12-02 21:16:16 UTC
I see that we resolve a possible symlink to a complete path for the save path to Exiv2. We can try the same when loading. The question is whether it works under Windows or has side effects, for example in connection with sidecars.

Maik
Comment 8 Maik Qualmann 2021-12-03 05:48:05 UTC
I think symlinks are not the cause. There is currently a problem with the current version of Exiv2 and Sony cameras with the size of the embedded thumbnail preview. Depending on the image, this can be too large and cause an exception in Exiv2. See bug 446403.
Please send a image to my mail to test it.

Maik
Comment 9 Maik Qualmann 2022-04-24 15:03:14 UTC
Git commit 802d92a3ec46e2ca1b60aa0e2e9bdb8516d4f041 by Maik Qualmann.
Committed on 24/04/2022 at 14:58.
Pushed by mqualmann into branch 'master'.

add read Exiv2 warnings and errors
to then read the metadata with ExifTool
Related: bug 452567, bug 450117, bug 432265, bug 449637

M  +6    -0    core/libs/metadataengine/engine/metaengine_fileio.cpp
M  +8    -0    core/libs/metadataengine/engine/metaengine_p.cpp
M  +1    -0    core/libs/metadataengine/engine/metaengine_p.h

https://invent.kde.org/graphics/digikam/commit/802d92a3ec46e2ca1b60aa0e2e9bdb8516d4f041
Comment 10 caulier.gilles 2023-05-02 06:17:25 UTC
@wuye9036@gmail.com 

digiKam 8.0.0 is out. This entry still valid with this release ?

Best regards

Gilles Caulier
Comment 11 wuye9036 2023-05-05 22:13:06 UTC
(In reply to caulier.gilles from comment #10)
> @wuye9036@gmail.com 
> 
> digiKam 8.0.0 is out. This entry still valid with this release ?
> 
> Best regards
> 
> Gilles Caulier

I will test it in soon
Comment 12 caulier.gilles 2023-05-12 14:53:27 UTC
Any feedback with digiKam 8.0.0 here ?

Gilles Caulier
Comment 13 caulier.gilles 2023-05-29 11:22:52 UTC
@wuye9036@gmail.com 

In digiKam 8.1.0, we use the new major Exiv2 0.28 release to handle metadata. A pre-release Windows installer is available here :

https://files.kde.org/digikam/

Can you reproduce the problem with this version ?

Gilles Caulier
Comment 14 wuye9036 2023-05-29 11:26:47 UTC
(In reply to caulier.gilles from comment #13)
> @wuye9036@gmail.com 
> 
> In digiKam 8.1.0, we use the new major Exiv2 0.28 release to handle
> metadata. A pre-release Windows installer is available here :
> 
> https://files.kde.org/digikam/
> 
> Can you reproduce the problem with this version ?
> 
> Gilles Caulier

Sure.
Comment 15 caulier.gilles 2023-05-29 15:34:48 UTC
What do you mean exactly ? the problem is reproducible with 8.1.0, or you will check if problem exists with this version ?
Comment 16 caulier.gilles 2023-10-15 10:07:25 UTC
@wuye9036@gmail.com,


This problem still reproducible with the new digiKam 8.2.0 pre-release Windows
installer available at usual place:

https://files.kde.org/digikam/

This new bundle is based on last Qt framework 5.15.11 and KDE framework 5.110.

Thanks in advance

Gilles Caulier
Comment 17 Maik Qualmann 2023-10-29 07:44:12 UTC
Git commit 7f900c7221e3c7977369527b21f56261614a95e1 by Maik Qualmann.
Committed on 29/10/2023 at 08:41.
Pushed by mqualmann into branch 'master'.

use QIODevice to read and write files with Exiv2
Related: bug 394736, bug 338462, bug 398582
FIXED-IN: 8.2.0

M  +3    -3    NEWS
M  +14   -8    core/libs/metadataengine/engine/metaengine_comments.cpp
M  +14   -8    core/libs/metadataengine/engine/metaengine_exif.cpp
M  +28   -18   core/libs/metadataengine/engine/metaengine_fileio.cpp
M  +14   -8    core/libs/metadataengine/engine/metaengine_iptc.cpp
M  +112  -43   core/libs/metadataengine/engine/metaengine_p.cpp
M  +14   -8    core/libs/metadataengine/engine/metaengine_previews.cpp
M  +15   -8    core/libs/metadataengine/engine/metaengine_xmp.cpp

https://invent.kde.org/graphics/digikam/-/commit/7f900c7221e3c7977369527b21f56261614a95e1