Skip navigation.

Log in | Sign up

Linux for Designers

a blog by Eckhard M. Jäger

Generating Thumbnails for Nautilus using Gimp

, , , , , , , , , ,

When browsing through directories and searching for an image it would often be helpful getting an thumbnail of an image. But Nautilus the files manager of the Gnome Desktop didn't support many images formats like Photoshop's PSD, Silicon Graphics RGB or Gimp's XCF files.
I created a Thumbnailer Gimp Python Plugin (copy it into "~/.gimp-2.4/plug-ins" and make sure it is executable) that generates thumbnails for Nautilus using Gimp.
That's the first version (of something like this) which means:
* No automatic thumbnail generation, you have to call it via Nautilus Scripts or Nautilus Actions like:
gimp-console  -i -n -f -d -s -b '(python-fu-thumbnailer RUN-NONINTERACTIVE "/your/path/here")'

or for Nautilus Actions:
gimp-console -i -n -f -d -s -b '(python-fu-thumbnailer RUN-NONINTERACTIVE "%d")'

* Didn't running inside of Gimp (toolbox)
* "Browse Images..." in Gimps image window isn't implemented yet
* no visual feedback at the moment how much thumbnails are generated

Gimp 2.4 User Manual BlenderArt Mag #13

Comments

freedo 2. December 2007, 17:24

That's nice!

I think it would be relatively easy to turn this into a "real" thumbnailer that would automatically be used by Nautilus for image previews. That way, you wouldn't have to execute the script manually. You could take the ODF-Thumbnailer as an example:
http://wiki.ubuntuusers.de/OpenDocument_Thumbnails

area42 2. December 2007, 19:06

Hey Fredo,

great idea! This Script is just the first step because my plan was a full integration into natilus and a "Browse Images" plugin for Gimp.
This helps me a lot! Thanks.

BTW: There is a Gimp procedure "gimp-file-save-thumbnail" that would be faster and using less memory instead of loading an image for thumbnail generation. But i didn't get it work :frown:
http://developer.gimp.org/api/2.0/libgimp/libgimp-gimpfileops.html#gimp-file-save-thumbnail

Anonymous 20. December 2007, 20:20

Sammy writes:

I see automatic thumbnails of XCF files in Nautilus. I don't use any script, it just works (not for Photoshop files though). I'm on Ubuntu 7.10. Isn't it working for you ?

Anonymous 20. December 2007, 20:33

Sammy writes:

... Maybe because I enabled thumbnails in Gimp preferences - environment. I don't remember if this was on by default.

area42 20. December 2007, 23:27

Thumbnails for nauilus are only generated when opening or saaving XCF files in Gimp. Not when you copy them from another source to your computer or exploring another computer.

Anonymous 5. February 2008, 17:52

Asheesh Laroia writes:

I'd like to reuse your work. Do you permit redistribution?

It'd be great if you'd leave a note on this page (or in the Zip file) saying, for example, "You can reuse my work under the terms of the GPLv2 or later, at your option," or whatever open source / free software license you prefer.

area42 5. February 2008, 18:18

I developed it further and wrote some Python-Plugins for Gimp. So i'm near by finisching that project to getting a Nautilus based image browsing. I just have to write the schema file now.

For what do you like to reuse it?

Anonymous 23. February 2008, 17:35

Anonymous writes:

Great Job, Thank You.

You know, Nautilus not having this built in is a big usability problem/issue. Not being able to view xcf thumbnails in nautilus by default when the gimp is so closely *related* to the whole gnome/linux experience is a sign that some may argue that *linux* lacks "fit and finish", Polish, ease of use, Just works, etc.

When I got down to some serious work with the gimp and was not able to view my previously "non gimp generated xcf thumbs", it just got damn right annoying and greatly decreased my productivity.

Anyway, thanks again for your great work :-)

Anonymous 4. September 2008, 21:12

plushpuffin writes:

This is awesome, and you are awesome by extension. Thank you.

How to use Quote function:

  1. Select some text
  2. Click on the Quote link

Write a comment

Comment
(BBcode and HTML is turned off for anonymous user comments.)

Type the two words displayed in the image below:


Smilies