On any other operating system, working with raw files and images is a brezze. You can open thousands of raw images in the systems file manager and you can’t even percieve the time it took to generate thumbnails.
On Linux/GNOME however that is not the case.
First of all, it doesn’t even come preconfigured to generate thumbnails for raw images on any distro. You have to edit
/usr/share/thumbnailers/gdk-pixbuf-thumbnailer.thumbnailer and manually add miemetypes otherwise thumbnails won’t be generated. I’d imagine for most ordinary users that would be the end of the road. They would just see that no thumbnails being generated and leave Linux.
Secondly. After you add the miemetypes and thumbnails are finally being generated, we still have the issue with thumbnail generation being way way too slow. Depending on how many raw files are you seing in Nautilus, the thumbnail generation can last for over 30min (for a few hundreds of raw images, which is not a lot) on a very high end machine. User basically has to wait for thumbnails to appear, and wait a long time. You can basically stare at the screen and count the seconds between each thumbnail that can take from 2 up to 10 seconds per thumbnail. On a low end machines it’s not even worth having the thumbnailer, the time it takes to generate thumbnails is too long to be of any real use.
When testing the raw thumbnail generation on MacOS and Windows it happens almost instantly. Not almost, but instantly tbh.
With digital images being more and more a part of our daily lives, with most modern phones having the ability to shoot raw and high megapixel raw images, with the introduction of high quality and cheaply available mirrorless cameras in the past 5 years, with GIMP and Darktable being some of the two most downloaded apps on app stores across all linux distributions, I’d like to ask if there is something that Gnome can do about it? Perhaps develop a state of the art raw thumbnailer for Gnome? If anyone is interested and skillful in that area? I myself don’t know how to code that but it would be well worth it for GNOME and various distros that are using it. It would greatly benefit the users.
Generating your own thumbnails from RAW files is a really expensive operation (as you noticed!) so I’d be very surprised if that’s what macOS or Windows are doing. Likely there’s some way for embedding a low-res thumbnail in the RAW file.
Of course none of that changes the desired outcome. It may mean we have to find those integrated thumbnails, though instead of computing our own ones. I wonder how the Photos App is handling this atm?
Edit: seems to have its own thumbnailer implementation: https://gitlab.gnome.org/GNOME/gnome-photos/-/blob/master/src/photos-thumbnailer.c
Yes, every raw file has thumbnails at multiple sizes embedded in it. Windows (and probably MacOS) uses LibRaw for accessing (or generating, idk) it. But in the foss world, all of the apps that deal with raw files have moved or are moving from LibRaw to Exiv2. Exiv2 is supposed to be much faster and robust as far as I’ve heard.
Another problem I forgot to mention with the current thumbnailer in gnome is that it’s not generating or getting thumbnails from the metadata at all for the HEIF, HEIC, AVIF and CR3 images.
Mobile phones are moving rapidly from jpeg to heif and even cameras like any Canon R model shoots CR3 raw and HEIF as lossy compressed format. Basically the gnome thumbnailer afaik doesn’t support the ISOBMFF formats at all, so users can’t get any previews.
Exiv2 just landed support for ISOBMFF a while ago. It would be so great if gnome raw thumbnailer was replaced with a solution based on Exiv2 or developed into one that supports all of the most used formats and isn’t unusably slow.
If anyone is interested in exploring this, you can perhaps start by exploring metadata with exiftool.
To view image metadata you can just:
$ exivtool <rawfile.ext>
There are multiple previews or thumbnails in raws these days, you can extract them by quality by running:
$ exiftool -b -JpgFromRaw [anyraw]>JpgFromRaw.jpg
$ exiftool -b -PreviewImage [anyraw]>PreviewImage.jpg
$ exiftool -b -ThumbnailImage [anyraw]>ThumbnailImage.jpg
Depending on the camera, some may have a differently named tags. The above is the standard but beware if you don’t get any output with exiftool. So I think Exiv2 abstracts that in some way for ease of use.
But when developing a software I see Darktable and DigiKam and others use Exiv2, unfortunately I’m not familiar how those commands go. It can be used from terminal like the exiftool but afaik it’s meant to be a lib in a software and not a standalone app.
Also, a bunch of raw files for testing and development purposes released under open license can be found here:
So you don’t even need to own a camera.
I really hope someone gets interested in this and picks it up.
Install ufraw or nufraw and crate a thumbnailer
/usr/share/thumbnailers/ufraw.thumbnailer with the content (example for nufraw):
Exec=nufraw-batch --silent --size %s --out-type=png --noexif --output=%o --overwrite --embedded-image %i
Check for image size limit:
gsettings get org.gnome.nautilus.preferences thumbnail-limit (change if too low). Restart nautilus:
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.