Thumbnail service

Sharing thumbnails among programs would of course be the right thing
to do.  There are several things to consider for EOG and Nautilus and
the GIMP.

Nautilus and the GIMP

Nautilus wants thumbnails for image files.  It would make sense for
the GIMP to generate thumbnails for the images it saves since it can
do all the layer-merging magic by itself.

Image Collections in EOG

I envision EOG having two different cases where it will want a
thumbnail view.  One is for when you are browsing the filesystem with
the intention of adding images to an image collection [read:
organizing your porn :) ].  The other one is when you are displaying
an image collection.

Browsing the file system is pretty much the same thing as the case for
Nautilus. [1]

For image collections, however, think of the following cases.

1. You have a collection that points to images on your hard drive.  It
   would not make sense to store the thumbnails in the collection file
   itself, because you want to share them with other programs.

2. You have a collection that points to images on the web
   (hand-picked-web-porn.collection).  You don't want to fetch the
   image from the web every time you want to display the collection,
   so you want to make a thumbnail of the images and cache them
   somewhere.  It makes sense to put them in the collection file
   itself because it doesn't make sense for other programs to have
   this information.  This would also allow you to manipulate the
   image collection with its nice thumbnails and you would only have
   to wait for files to be downloaded when you actually want to view
   the full-size images.

I don't want to have a mess of locking files and ad-hoc mechanisms
defined; I want

	interface ThumbnailListener;

	interface ThumbnailService : Bonobo::Unknown {
		/* You ask for a thumbnail with this, get notified
		 * later when it is ready.
		void requesthumbnail (in string filename, in ThumbnailListener listener);

		/* You unconditionally discard a cached thumbnail with this */
		void discardThumbnail (in string filename);

		/* Allows the GIMP to create its own stuff */
		void putThumbnail (in string filename, in YourFavPictureFormat image);

	interface ThumbnailListener : Bonobo::Unknown {
		void notifyThumbnailReady (in string filename, in YourFavPictureFormat image);

The ThumbnailService would also have the PropertyBag interface with
things like thumbnail width/height and the maximum size of the thumbnail

Does anyone think having such a service is a good idea?

[1] Why don't we simply use a directory browser control from Nautilus
and get done with it?  Comments?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]