Ristretto, a ‘lightweight’ image viewer

From the moment I started developing ristretto, I mentioned that it was a simple lightweight image viewer. This is a statement which is bound to be disputed by some, and here is the reason why: ‘There is no such thing as a lightweight image viewer‘. And they are right, decompressing an image requires a lot of CPU-power, and a fully decompressed image requires the presence of enough RAM memory in order to do anything usefull with it at any acceptable speed. No image viewer has been able to surpass this limitation, ristretto is no exception to that rule.

So, why do I say ristretto is lightweight? — Because there is more to an image viewer then the two constants I mentioned before, a basic image viewer should:

  • Navigate between images in an entire folder
  • Display image thumbnails
  • Run a slideshow
  • Flip / Rotate images
  • Read (and interpret) EXIF meta-data, for jpeg images taken by digital camera’s.
  • Have well-documented comprehensible code

At this moment, a rudimentary implementation of these features have found their way inside ristretto. Rudimentary, because each component is being looked after if it needs refactoring. The goal is to improve these features until ristretto is a stable and fast image viewer using as little memory as possible (making it relatively lightweight), considering it’s purpose.

I’ve just summed up the first priority of ristretto development; to write a simple and fast image viewer, which does just that: show images.

Any additional features, like importing images from a digital camera (using libgphoto2) or printing images to paper could probably be added through a plugin interface or something. Keeping the basic application simple while allowing individual users to add features they like. If, when and how this is going to be implemented is still a question though ;).

14 thoughts on “Ristretto, a ‘lightweight’ image viewer

  1. really nice! I love to use it :) Although sometimes I’d like to hide the view of all images in the folder ;)

  2. This is a great little app so far. A great addition to the Xfce lineup of apps. I would very much enjoy a plugin for digital cameras. Keep up the great work!

  3. I have come to “believe” in Xfce, and am having a wonderful time getting to know it via the Xubuntu distribution. Since Ristretto is the “real” Xfce Image Viewer, I’ve given 0.17 a whirl, and with an icon cache of 1GB it really works well. (I like Xfce for looks and functionality, not because its lightweight, that’s just a plus!)

    Ristretto’s thumbnail browser is GREAT, looks so polished, and the only niggle I have is that there is no menu item for “fullscreen”.

  4. #3 Please, tell me in which ways ristretto is an improvement over gqview…

    IMHO ristretto still lacks some features and is not as stable as gqview. And you call it lightweight but gqview is at least as fast.


  5. I think lightweight means not requiring more resources than is necessary to do the task, and not doing too many tasks. So in a sense lightweight is synonymous with “efficient and small”.

  6. Hi excuse me, i have notice there are transparent effects ond the screenshots but i can’t find a way to create them, i am using XFCE 4.4.1, do i need to upgrade to 4.4.2? or there is a file i can modify to get this effects?

  7. Ristretto 0.0.18
    a quirk or a bug?
    running Xubuntu Hardy with xfce

    I have come across the following anomaly:

    Using Ristretto to open /home/my-name/.thumbnails/normal and then look at the thumbnails [of thumbnails] initially causes all the files found to be duplicated back into /home/my-name/.thumbnails/normal.
    i.e. if there were originally x number of files, that will double to 2x.
    The files newly created have a different ‘name’ e.g. file:///home/my-name/.thumbnails/normal/5cf9c58f655e8e8b06f045386a45a6e6.png.

    Now quit Ristretto, open it again and repeat as above.

    What will happen is that again the original x number of files are added into the /home/my-name/.thumbnails/normal folder, making it to now contain 3x number of files. [assuming no other folders containing images were opened in between the first and the second use of Ristretto]

    If /home/my-name/.thumbnails/normal initially contains a large number of files [which may well be the case], then the REPEATED use of Ristretto to look at them, will rapidly [and unnecessarily I guess] increase/inflate the size of the folder.

    I guess it might be argued that not many users would use Ristretto to access files in the /home/my-name/.thumbnails directory. ;)

    I have used gThumb to try and replicate what Ristretto does to /home/my-name/.thumbnails/normal.
    The result was negative, gThumb does NOT cause the duplication I have observed when using Ristretto.
    As a further test I used XnView [through Wine], again the result was negative, as with gThumb.

    Interesting, that using XnView [through Wine] to look at images [other than those in /home/my-name/.thumbnails] does not appear to create anything into /home/my-name/.thumbnails. In contrast, gThumb as well as Ristretto do create thumbnails of the images [if not viewed before].

    I like Ristretto with its few basic functions, however I find that by CLICKING an image file [in the file browser], Ristretto ought to open that file only, without attempting to immediately [pre-]load all other image files in the same folder. This can be a nuisance or worse, Ristretto[?] fails when the number/size of the images in a folder is large. I realise that I can look up single images by going through Ristretto’s menu File > Open

    -noted that gThumb also pre-loads what is in a folder, even if just a single file is clicked
    -have now de-selected ‘Show thumbnails’ in the file browser’s preferences, that way image thumbnails are not created automatically in /home/my-name/.thumbnails when accessing icon or pixmap folders in /usr/share. They still get created when looked at with gThumb or Ristretto, because both applications pre-load entire folders! ]

    29-5-08 PF

  8. Nice little program however I miss the ability to step through images using left and right arrow keys as is usual in other image viewers. Keep Page Up and Page Down for this as well if that suits other people better.
    Also, is it possible to prevent storage of image thumbnails? I do not like my system cluttered with small image files even if that results in a slowdown of image loading.

  9. Please keep up the good work. This is the first time I’ve tried Xfce and I must say it is amazing. I particularly like the way you have delineated yourself from GNOME and kept the DE small and simple. Simply beautiful. Please maintain this trend for the future.

  10. I really like Ristretto, because the interface is comfortable and it may fit better as a viewing app for my OpenMoko than GQView.
    Anyway I don’t use it, because it is WAY slower than GQView and uses WAY more CPU power when you scroll an image. Maybe that’s because Ristretto “forgets” the parts of the image that are not visible and has to render them again? Maybe there should be a memory limit, to which images are held completely in memory, to fix this problem.
    I would do this by myself, but I’ve never done anything with C, so it would be cool if somebody who is fluid with C could take look at it…

Comments are closed.