Since I upgraded to Ubuntu 20.04, I cannot generate thumbnails any more for my Fujifilm RAF files and Gimp files created by Gimp 2.10 or newer.
ufraw and gnome-raw-thumbnailer have been removed from the repositories and now I rely on gdk-pixbuf-thumbnailer for RAW file thumbnail generation, but it apparently doesn’t recognize RAF files:
$ gdk-pixbuf-thumbnailer -s 512 photo.raf thumbnail.png
** (gdk-pixbuf-thumbnailer:4097): WARNING **: 22:32:25.888: Could not thumbnail 'photo.raf': Couldn?t recognize the image file format for file ?photo.raf?
For Nikon NEF files it works without problems.
To generate XCF thumbnails I use xcf2png, but XCF versions higher than 10 aren’t supported any more:
$ xcf2png image.xcf -o thumbnail.png
Warning: XCF version 12 not supported (trying anyway...)
Can anyone successfully generate thumbnails for Fujifilm RAF and/or Gimp 2.10 XCF files on their Ubuntu 20.04?
Yes, tumblerd is running with tumbler-plugins-extra installed. I can also see that tumblerd calls the thumbnailer, but gdk-pixbuf-thumbnailer/xcf2png fail to generate the thumbnails for RAF and XCF files.
May I ask if you use Gimp from the repositories or from snap/flatpak? Whenever you save a XCF file, Gimp automatically generates the thumbnail. In case Gimp is intalled via apt, the thumbnail is stored in ~/.cache/thumbnails from where the file browsers can access it. In case Gimp is installed from snap/flatpak, it stores its thumbnails in a different cache, which is not accessible for the file browsers.
Concerning the RAF thumbnails, do you use a tool like Rapid Photo Downloader? Some downloaders generate system thumbnails upon file download so tumblerd doesn’t have to do it.
Anyway, I would really appreciate if you could send me the files in /usr/share/thumbnailers from your system so I can compare them with mine.
@christoph I’m using Gimp 2.10.23 from appimage. There are probably newer versions by now. It’s been months since I installed that one.
Ubuntu Studio has Rapid Photo Downloader installed but I’ve never used it.
The /usr/share/thumbnailers folder has 7 files in there. Here goes it.
Thanks a lot for your reply. I don’t know if AppImages are also confined or if Gimp can store its thumbnails in the normal folder for the file manager to find them there. Whatsoever, I “solved” my problem by using exclusively Gimp’s flatpak cache for all thumbnails:
What puzzles me more is from where you get your RAF thumbnails. In the thumbnailers you posted above there is not even the RAF file format registered as MIME type (image/x-fuji-raf;image/x-raf;). Tumbler shouldn’t even attempt to create thumbnails for RAF files.
Anyway, I set down in the last hours and implemented my own thumbnailer for RAF files. In case anyone is interested:
First create the following bash script in /usr/local/bin/raf-thumbnailer (or any other folder of your liking):
#!/bin/bash
# Thumbnailer for Fujifilm RAF files
# This script depends on the following packages:
# - gridsite-clients for urlencode
# - exiv2 for exiv2
# - imagemagick for convert
# Check for correct number of command-line arguments
if [ $# -eq 3 ]
then
# First argument is path to RAW file (convert from URI to normal path)
RAW=$(urlencode -d "$1")
# Second argument is output path for thumbnail file
OUT="$2"
# Third argument is image size
SIZE="$3"
# Remove directory from path
NAME="${RAW##*/}"
# Remove extension from file name
BASE="${NAME%.*}"
# Compose path to thumbnail as composed by exiv2
PREV="/tmp/${BASE}-preview2.jpg"
# Change into directory for temporary files:
# exiv2 should store the preview image there when given the argument
# "-l /tmp", but it always stores it in the current working directory.
cd "/tmp"
# Extract preview image from RAW file
exiv2 -ep2 -f "${RAW}"
# Convert preview image into thumbnail
convert -auto-orient -scale "${SIZE}x${SIZE}" "${PREV}" "${OUT}"
# Delete preview image
rm -f "${PREV}"
fi
Then register this script as thumbnailer for RAF files by creating file /usr/share/thumbnailers/raf.thumbnailer:
OMG you are amazing I can’t believe that in Ubuntu 23.10 and Debian 12 with Gnome there still isn’t any RAW thumbnailer support and all online articles do not help using packages that can no longer be installed!
Your thumnailer works great for RAW RAF, DNG files, however x-sony-arw for some reason doesn’t show.
I am getting an error when opening it Image Magick directly:
Unknown field with tag 50341 (0xc4a5) encountered. 'TIFFReadDirectory'@ warning/tiff.c/TIFFWArnings/985: