Bug 420252 - Thumbnails of MPO images appear corrupted
Summary: Thumbnails of MPO images appear corrupted
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Thumbs-IconView (show other bugs)
Version: 6.4.0
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-18 13:58 UTC by doraemon.seibyou
Modified: 2020-04-18 17:28 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description doraemon.seibyou 2020-04-18 13:58:35 UTC
SUMMARY
In album views, the thumbnails of all my mpo (3d images) file appear as corrupt data, while the thumbails of the jpeg files are correct.

STEPS TO REPRODUCE
1. create a folder f1 containing one or more mpo files
2. disable the current digikam database by simply renaming it, to force digikam to create a new database on next run.
3. start digikam. This should allow you to create a new database. When asked, select the filder f1 as the photos folder
4. digikam will then generate the thumbnails for the photos

OBSERVED RESULT
The thumbnails of the mpo files appear as corrupt data (mostly grey with random patterns)

EXPECTED RESULT
Well, the thumbnails are expected to look like small versions of the photos

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Linux Ubuntu 64bits 18.04
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
- thumbnails for mpo files used to be correctly generated (only thumbnails for newly imported MPO files are corrupt), so I beleive there has been a regression at some point, but I can't tell with which version of digikam the corruption started. All I know is that digikam 6.3.0, has the same problem.
- I initially thought that my MPO files themselves might be corrupted, but it doesn't seem to be the case, as I tried to reimport import an MPO image which had a proper thumbnail, and its newly generated thumbnail is corrupt as well
- I can send you one of my MPO files if needed.
Comment 1 doraemon.seibyou 2020-04-18 14:16:42 UTC
I had a look at digikam's source code from git, and I suspect that the problem might be in VideoThumbnailer::generateSmartThumbnail, as it seems that mpo files are treated by digikam as video files.

VideoThumbnailer::generateSmartThumbnail seems to decode SMART_FRAME_ATTEMPTS=25 frames, while my mpo files only contain 2 frames (they are generated by a fujifilm real 3d stereo camera).

It's just a guess here as I'm new to digikam's code, maybe I'm wrong...

Hope this helps anyway...
Comment 2 Maik Qualmann 2020-04-18 17:25:27 UTC
Git commit 64b4dc29aa97f06450077c9fbd35b9ecb3827b3b by Maik Qualmann.
Committed on 18/04/2020 at 17:23.
Pushed by mqualmann into branch 'master'.

an MPO file is not a video file, but more a JPG file
FIXED-IN: 7.0.0

M  +2    -1    NEWS
M  +4    -3    core/libs/database/coredb/coredbschemaupdater.cpp
M  +26   -6    core/libs/database/item/scanner/itemscanner_video.cpp
M  +10   -5    core/utilities/import/main/importui.cpp

https://invent.kde.org/kde/digikam/commit/64b4dc29aa97f06450077c9fbd35b9ecb3827b3b
Comment 3 Maik Qualmann 2020-04-18 17:28:44 UTC
Note: In order to correctly display MPO files, the metadata must be read again and the thumbnails must be created again with "F5" or the Maintenance Tool.

Maik