I created some thumbnailers for Krita (.kra), Gimp (.xcf), OpenRaster (.ora) and Adobe Photoshop (.psd) files and added them to my Ubuntu PPA as the package mmolch-thumbnailers. They use xcf2png, unzip and imagemagick behind the scenes and are used by most GTK based file managers (Nautilus, Nemo, PCManFM etc.)

You can use the following line to add the PPA and install the package:

sudo add-apt-repository ppa:mmolch && sudo apt-get update && sudo apt-get -y install mmolch-thumbnailers

Don't forget to restart your file manager after the installation to activate the thumbnailers (e.g. nautilus -q).

In detail it contains the following files:

kra.thumbnailer

[Thumbnailer Entry]
TryExec=unzip
Exec=sh -c "unzip -p %i preview.png > %o"
MimeType=application/x-krita;

ora.thumbnailer

[Thumbnailer Entry]
TryExec=unzip
Exec=sh -c "unzip -p %i Thumbnails/thumbnail.png > %o"
MimeType=image/openraster;

psd.thumbnailer

[Thumbnailer Entry]
TryExec=convert
Exec=convert psd:%i[0] -scale 512x%s png:%o
MimeType=image/vnd.adobe.photoshop;

xcf.thumbnailer

[Thumbnailer Entry]
TryExec=xcf2png
Exec=sh -c "xcf2png %i -o - | convert -scale 512x%s - png:%o"
MimeType=image/x-xcf;

According to the thumbnailer specification, the %s parameter specifies the height the thumbnail should have. 512 seems like a reasonable value for the maximal width.


5 Responses to “Thumbnailers for Krita (.kra), Gimp (.xcf), OpenRaster (.ora) and Adobe Photoshop (.psd) files”

  1. Jake
    November 3rd, 2016 at 04:12
    1

    Thanks! Awesome, works great for my psd files.

  2. Anonymous
    December 8th, 2018 at 10:01
    2

    didn’t work in ubuntu 18.04

  3. Moritz
    December 10th, 2018 at 22:50
    3

    @Anonymous: Thanks for reporting. I added the package for 18.04 and it should work now.

  4. Stefan
    January 5th, 2019 at 17:27
    4

    Hi Moritz, seems like you missed the latest changes in deprecating eregi regex commands under PHP 7.x on your site. I had to replace eregi(‘pattern’, $string) with the more general perl regex pattern matching preg_match(‘/pattern/i’, $string).

    Would you mind updating / fixing your content system as I would like to get hold of your thumbnailers for krita, gimp, openraster and photoshop ?

    BTW do you also include thumbnailer for SVG ?

    Kind regards,
    Stefan

  5. Moritz
    January 5th, 2019 at 21:12
    5

    @Stefan: Thanks for reporting. The librsvg2-common package already contains an svg thumbnailer. I don’t know how well it works though.

    Kind regards,
    Moritz

Leave a Comment

I respect your privacy
I don't run any trackers on this site.

Your questionable browsing-history should remain between you and the NSA ;-)
Contact