GNOME Bugzilla – Bug 362629
Provide a gnome compatible thumbnailer
Last modified: 2008-05-01 16:49:50 UTC
It would be nice if the GIMP could provide a GNOME thumbnailer for the format it supports, especially for the ones not supported by GdkPixbuf such as .xcf (and the compressed variants). I'm pretty sure this has been filed at some point, but couldn't find it in bugzilla.
It has never been filed and I wonder how useful such a thumbnailer would be because GIMP already writes thumbnails for every file it loads and saves. Please tell us what purpose such a thumbnailer should fulfill and how one would implement such a best if we decided that it's worth doing it.
It would be useful for files that aren't generated on the machine itself (downloaded, shared across machines on a share, etc.). Otherwise one would need to open all the files one-by-one to get thumbnails (there are some GIMP script-fu hacks available to do the thumbnailing, but they're not very robust at all).
If we added a thumbnailer, it would also be a script. The functionality to open and render an XCF file can't be easily ripped out of GIMP. The best way to implement this would be to write a script in whatever language and let it call gimp-console, the console-mode GIMP binary that doesn't need a display to run. You still haven't pointed us to any documents that describe how to implement a GNOME compatible thumbnailer.
(In reply to comment #3) > If we added a thumbnailer, it would also be a script. The functionality to open > and render an XCF file can't be easily ripped out of GIMP. The best way to > implement this would be to write a script in whatever language and let it call > gimp-console, the console-mode GIMP binary that doesn't need a display to run. Fair enough. There are already a few scripts available to do this, I guess it would be fairly straight forward adapting those. > You still haven't pointed us to any documents that describe how to implement a > GNOME compatible thumbnailer. Federico has a pretty nice explanation: http://primates.ximian.com/~federico/docs/gnome-isv-guide/index.html#thumbnailer The only part of GConf needed would be in a post-install script, which means that it would be possible to avoid using it were it not present.
There are some issues with the script approach: (1) Starting a GIMP instance and a script interpreter for each image to be thumbnailed would be slow and quite demanding on CPU and memory. (2) GIMP can't currently be run without doing a user installation. It does that silently but a thumbnailer shouldn't create any files but the thumbnail. (3) The size of the thumbnail can currently not be specified through the PDB. It is set in the user's gimprc. (4) Other formats than XCF are not implemented in the core and require plug-ins to be loaded. We would need to query all existing plug-ins for this. If we would workaround problem (2) and let the thumbnailer run without interfering with the users gimp directory, then we could not even cache this information. This would make the thumbnailer unacceptably slow. I could imagine that one could create a dedicated thumbnailer binary. Similar to gimp-console, it would link most of the GIMP core but it would not attempt to do a user installation and it would accept the command-line options as described in the link given above. Such a binary would however not be able to run any plug-ins. That would be sufficient for thumbnailing XCF files. It could probably even link with gconf and gnome-vfs then and it should probably link with libz in order to allow thumbnailing of xcf.gz files.
If we actually wrote such a tool, it should probably also allow to create full-size PNG images of XCF files. That would make it usable from image viewers that wish to display XCF files.
Is't it easyer to use Henning Makholms Xcftools? http://henning.makholm.net/software
gnome-xcf-thumbnailer based on the XCF tools is available in the GNOME SVN[1] and FTP[2]. [1]: http://svn.gnome.org/viewvc/gnome-xcf-thumbnailer/trunk/ [2]: http://download.gnome.org/sources/gnome-xcf-thumbnailer/1.0/ Enjoy!