[HOW TO] Openraster (*.ora) thumbnails for Nautilus in Xubuntu 12.04

OpenRaster is a file format proposed for the common exchange of layered images between raster graphics editors.

It is the default working file format for MyPaint, and it's also supported by application such as GIMP and Krita.

Nautilus showing thumbnails for openraster (*.ora) files.

Install

I created a simple python script (adapting this one, written by David Revoy) that creates the file thumbnail, then all it's needed is the thumbnailer to call the script. Open a terminal window and run:

wget -q http://goo.gl/cbXjm -O- | sudo tee /usr/local/bin/openraster_thumbnailer.py
wget -q http://goo.gl/nlODH -O- | sudo tee /usr/share/thumbnailers/openraster.thumbnailer
sudo chmod +x /usr/local/bin/openraster_thumbnailer.py

References

OpenRaster at Wikipedia
Krita kra file thumbnailer for Gnome,Nautilus (Linux)

Comments

  1. thank you, just thought i would mention that if you use arch linux the Image python library dependancy seems broken in python3, so for this to work you need to specify python2.7 interpreter at the top of the /usr/local/bin/openraster_thumbnailer.py

    and install python-imaging package,

    also in order to force a refresh of your thumbnail cache you need to delete ~/.thumbnails

    also the default maximum size for files that thumbnails are generated for is 10 Mb, which is kindof small, you may want to increase that to 100 Mb

    ReplyDelete
  2. Many thanks for this !
    Work like a charm here. Good to find back the *.ora preview when I test Ubuntu.
    I might modify it, and add *.kra ( krita ) support too based on the same structure. Very cool.

    ReplyDelete
    Replies
    1. It's a very simple procedure indeed. To accomplish the same for Krita thumbnails we just need to create /usr/share/thumbnailers/krita.thumbnailer, with the contents pasted below, after copying your script (http://goo.gl/LuYv2) to /usr/local/bin/krita_thumbnailer.py and make it executable. Thank you.

      # krita.thumbnailer
      [Thumbnailer Entry]
      TryExec=/usr/local/bin/krita_thumbnailer.py
      Exec=/usr/local/bin/krita_thumbnailer.py %i %o %s
      MimeType=application/x-krita

      Delete
  3. Is the thumbnailer.py file also applicable to Krita running on x86 Windows 7? The .kra file thumbnails are missing the actual contents of the file and only a generic icon appears. Thank you.

    Krita Version: 2.8 alpha
    KDE: 4.7.4

    ReplyDelete
    Replies
    1. I'm sorry, but I don't know how Windows thumbnails work.

      Delete

Post a Comment

Popular posts from this blog

[FIX] VLC is unable to open the MRL (smb://)

Add items to Xfce Applications Menu