Bug 453480 - No image preview for .RW2 files (image/x-panasonic-rw2)
Summary: No image preview for .RW2 files (image/x-panasonic-rw2)
Status: RESOLVED FIXED
Alias: None
Product: kio-extras
Classification: Frameworks and Libraries
Component: Thumbnails and previews (show other bugs)
Version: 22.04.0
Platform: Archlinux Linux
: NOR normal
Target Milestone: ---
Assignee: Alexander Lohnau
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2022-05-06 23:05 UTC by Candid Dauth
Modified: 2022-08-21 06:27 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.97


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

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

SUMMARY

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`.

SOFTWARE/OS VERSIONS
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...

Thanks

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
MimeType=image/x-dcraw;

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

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

Thanks
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

https://invent.kde.org/frameworks/kio/commit/871a3310997badd5f944f851622c04094c7b152c
Comment 20 Candid Dauth 2022-07-02 15:32:26 UTC
Trying this with the following version:
Linux: 5.18.7-arch1-1
KDE Plasma Version: 5.25.2
KDE Frameworks Version: 5.95.0
Qt Version: 5.15.5

The workaround to disable image previews no longer works. Raw file previews still don't work (except for files where the preview is still cached from the workaround).
Comment 21 Alexander Lohnau 2022-07-03 14:59:52 UTC
Could you provide an example file having the issue?
Comment 22 Candid Dauth 2022-07-03 15:15:52 UTC
The problem happens for me for all raw files, including the one that I previously linked: https://cloud2.rankenste.in/s/7BT3r3qCKGzWM8R
Comment 23 Bug Janitor Service 2022-07-08 09:02:59 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/901
Comment 24 Alexander Lohnau 2022-07-08 09:28:34 UTC
Git commit 5002a07e71ff270a8717911b965a75c33993f883 by Alexander Lohnau.
Committed on 08/07/2022 at 09:02.
Pushed by alex into branch 'master'.

Fix thumbnailer result for parent mime types being overwritten

M  +7    -5    src/widgets/previewjob.cpp

https://invent.kde.org/frameworks/kio/commit/5002a07e71ff270a8717911b965a75c33993f883
Comment 25 ChrisC1377 2022-08-07 15:18:23 UTC
Hi, always the same problem for me in Dolphin and now the thumbnails generation in Gwenview doesn't fix the issue...
Comment 26 Nate Graham 2022-08-07 18:20:01 UTC
This bug is listed as fixed in Frameworks 5.97. Are you using a pre-release version of Frameworks 5.97 (which hasn't been released yet)? If not, then you'll need to wait for it to be released and then upgrade to it before you can test whether the bug has been fixed or not.
Comment 27 ChrisC1377 2022-08-11 16:28:26 UTC
(In reply to Nate Graham from comment #26)
> This bug is listed as fixed in Frameworks 5.97. Are you using a pre-release
> version of Frameworks 5.97 (which hasn't been released yet)? If not, then
> you'll need to wait for it to be released and then upgrade to it before you
> can test whether the bug has been fixed or not.

Ho sorry, no I'm always with 5.96... Thanks
Comment 28 Candid Dauth 2022-08-21 06:27:51 UTC
Thank you, I can confirm that the issue is fixed with KDE Frameworks 5.97.0!