Bug 453480 - No image preview for .RW2 files (image/x-panasonic-rw2)
Summary: No image preview for .RW2 files (image/x-panasonic-rw2)
Alias: None
Product: kio-extras
Classification: Unclassified
Component: Thumbnails and previews (show other bugs)
Version: 22.04.0
Platform: Archlinux Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Alexander Lohnau
Keywords: regression
Depends on:
Reported: 2022-05-06 23:05 UTC by Candid Dauth
Modified: 2022-06-01 20:29 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.95

Dolphin preview settings (166.27 KB, image/png)
2022-05-06 23:05 UTC, Candid Dauth
No preview at high zoom level (221.47 KB, image/png)
2022-05-06 23:06 UTC, Candid Dauth
Some previews at low zoom level (49.11 KB, image/png)
2022-05-06 23:06 UTC, Candid Dauth

Note You need to log in before you can comment on or make changes to this bug.
Description Candid Dauth 2022-05-06 23:05:49 UTC
Created attachment 148619 [details]
Dolphin preview settings


In Dolphin and other KDE file browser components, I don't get image previews for Panasonic raw files (.RW2) anymore. This still used to work a few months ago, although I don't know in what KDE version exactly.

Image previews for other file types seem to work without problems. At smaller zoom levels, the preview works for a few individual files, although I am unable to tell what makes them different (it is not the file size).

In the preview settings of Dolphin, I have RAW Photo Camera Files enabled. In `~/.config/dolphinrc` under `[PreviewSettings]`, `rawthumbnail` appears in `Plugins`. Also, `kdegraphics-thumbnailers` is installed, providing `/usr/lib/qt/plugins/rawthumbnail.so` and `/usr/share/kservices5/rawthumbnail.desktop`.

Dolphin does not give any output to stdout nor to `journalctl`.

Linux: 5.17.5-arch1-1
KDE Plasma Version: 5.24.5
KDE Frameworks Version: 5.93.0
Qt Version: 5.15.3
Comment 1 Candid Dauth 2022-05-06 23:06:25 UTC
Created attachment 148620 [details]
No preview at high zoom level
Comment 2 Candid Dauth 2022-05-06 23:06:45 UTC
Created attachment 148621 [details]
Some previews at low zoom level
Comment 3 Andrew 2022-05-08 23:54:10 UTC
Same issue, but for me NEF files from Nikon doesn't generate thumbnails. In the past used to work
Comment 4 Nate Graham 2022-05-09 16:44:45 UTC
Can you check again with Frameworks 5.94 which will be released in a few days? If that fixes it, then this was an example of Bug 451408, which is fixed in that release.
Comment 5 Andrew 2022-05-15 23:14:25 UTC
Today I update to KDE Framework 5.94, but still no thumbnails on RAW images
Comment 6 Nate Graham 2022-05-16 16:03:35 UTC
OK, I guess that wasn't it.
Comment 7 ChrisC1377 2022-05-23 16:37:54 UTC
Hi every one,

Same problem here with fujifilm raw images files (.RAF), it was working a few days/weeks ago...


Operating System: Arch Linux
KDE Plasma Version: 5.24.5
KDE Frameworks Version: 5.94.0
Qt Version: 5.15.4
Kernel Version: 5.17.9-arch1-1 (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-4790K CPU @ 4.00GHz
Memory: 31.3 GiB of RAM
Graphics Processor: NVIDIA GeForce GTX 970/PCIe/SSE2
Comment 8 ChrisC1377 2022-05-29 21:26:28 UTC
Once generated in the Gwenview browser, thumbnails are working fine in Dolphin, and if I want big thumbnails I have to generate big thumbnails first in Gwenview.

I don't know if it can help... Thanks
Comment 9 Candid Dauth 2022-05-29 21:29:22 UTC
I cannot confirm that opening the folder in Gwenview changes anything. The previews show up fine for me in Gwenview, but it does not affect the fact that they are not displayed in Dolphin.
Comment 10 ChrisC1377 2022-05-30 08:10:22 UTC
Just before I tried to install libopenraw and reinstall kdegraphics-thumbnailers.... I don't know if it can help.
Comment 11 ChrisC1377 2022-05-30 08:14:21 UTC
New raw files this morning, no thumbnails in Dolphin and once generated in the Browse section of Gwenview, it works fine again in Dolphin
Comment 12 Kai Uwe Broulik 2022-05-30 10:05:35 UTC
Possibly a regression in thumbnail plug-in loading, as the raw thumbnailer says:

# image/x-dcraw is the subclass for all "raw" image formats, so no need to list them all

Possibly this inheritance isn't checked anymore.
Comment 13 Alexander Lohnau 2022-05-30 19:59:43 UTC
Please attach an example file to test this with.

Does deactivating the "Images (gIf, png...)" make the previews work?
Comment 14 Candid Dauth 2022-05-30 20:05:18 UTC
Find an example image here: https://cloud2.rankenste.in/s/7BT3r3qCKGzWM8R (it is too large to be attached here).

Disabling image previews does indeed fix the problem, thanks for the helpful workaround.
Comment 15 Alexander Lohnau 2022-05-30 20:21:00 UTC
>Disabling image previews does indeed fix the problem, thanks for the helpful workaround.

Happy to help. Then my time debugging this came up with actually useful results :D

Regarding the root cause: my guess is that the raw thumbnailer provides a mimetype that we search for by the parent mime types (which works). However, the thumbnailer I asked you to disable has "image/*" as a mimetype. Meaning it says that it can consume any image.

A solution would be to process the parent mimetypes first, before evaluating the wildcards. Though it will need some though regarding potential sideeffects.

>Find an example image here

Comment 16 ChrisC1377 2022-05-31 04:04:38 UTC
Its works for me too...

Comment 17 Alexander Lohnau 2022-05-31 16:00:59 UTC
This is a regression from https://invent.kde.org/network/kio-extras/-/commit/667f8dd3ee884192602a92429f5fe10f9259303d.
I would suggest reverting that in the release branches, but not in master.

For KIO, I will make a MR to resolve the parent mime types first and then handle the wildcards.
Comment 18 Bug Janitor Service 2022-05-31 16:08:02 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/857
Comment 19 Alexander Lohnau 2022-05-31 19:22:39 UTC
Git commit 871a3310997badd5f944f851622c04094c7b152c by Alexander Lohnau.
Committed on 31/05/2022 at 16:01.
Pushed by alex into branch 'master'.

PreviewJob: Resolve parent mime types before checking wildcards

If we have a thumbnailer with a wildcard and the mime type does not exactly match, we would
very likely ignore the parent mime type checks and use the thumbnailer with the wildcard.

In case of the raw-thumbnailer, only the parent mime type of all raw images is registered.
But with the change of the imagethumbnailer to have a wildcard-mimetype, we never call it.

Considering that the wildcards should be used as a fallback, checking it last is reasonable anyways.

M  +14   -15   src/widgets/previewjob.cpp