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

Frederik Elwertfreedo Sunday, December 2, 2007 5:24:21 PM

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

Eckhard M. Jägerarea42 Sunday, December 2, 2007 7:06:14 PM

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 sad
http://developer.gimp.org/api/2.0/libgimp/libgimp-gimpfileops.html#gimp-file-save-thumbnail

Anonymous Thursday, December 20, 2007 8:20:32 PM

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 Thursday, December 20, 2007 8:33:06 PM

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

Eckhard M. Jägerarea42 Thursday, December 20, 2007 11:27:57 PM

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 Tuesday, February 5, 2008 5:52:36 PM

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.

Eckhard M. Jägerarea42 Tuesday, February 5, 2008 6:18:46 PM

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 Saturday, February 23, 2008 5:35:14 PM

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 Thursday, September 4, 2008 9:12:33 PM

plushpuffin writes: This is awesome, and you are awesome by extension. Thank you.

Anonymous Thursday, December 24, 2009 3:40:50 AM

nate writes: It took me awhile to get it to work but It does work! For some reason thumbnails did not show up in Nautilus but after thumbnails were called up by gthumb then images showed up in Nautilus. I was confused about what you meant by executable, I eventually realized you meant changing the file permissions so that it could run. (Chmod +x /file ) Thanks for the fix!

Eckhard M. Jägerarea42 Thursday, December 24, 2009 1:10:18 PM

@Nate: Ths method is old, better check out this post:
http://my.opera.com/area42/blog/thumbnailer-gnome-nautilus-desktop

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

If you can't read the words, press the small reload icon.


Smilies