After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 362629 - Provide a gnome compatible thumbnailer
Provide a gnome compatible thumbnailer
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: General
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2006-10-16 15:47 UTC by Bastien Nocera
Modified: 2008-05-01 16:49 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Bastien Nocera 2006-10-16 15:47:42 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.
Comment 1 Sven Neumann 2006-10-17 09:31:09 UTC
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.
Comment 2 Bastien Nocera 2006-10-17 09:36:02 UTC
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).
Comment 3 Sven Neumann 2006-10-17 12:22:18 UTC
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.
Comment 4 Bastien Nocera 2006-10-17 12:52:59 UTC
(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.
Comment 5 Sven Neumann 2006-10-17 14:12:03 UTC
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.
Comment 6 Sven Neumann 2006-10-17 14:15:34 UTC
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.
Comment 7 tobias 2006-10-18 09:04:38 UTC
Is't it easyer to use Henning Makholms Xcftools?
http://henning.makholm.net/software
Comment 8 Bastien Nocera 2008-05-01 16:49:50 UTC
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!