[Gimp-developer] thumbnail generation for nautilus via gimp
David Gowers
00ai99 at gmail.com
Mon Dec 3 00:50:31 PST 2007
Hi Eckhard,
On Dec 2, 2007 6:15 AM, Eckhard M. Jäger <bart at neeneenee.de> wrote:
>
>
> Hello,
>
> i got the idea to create a python script thats generate the thumbnails of
> unsupported images in nautilus using gimp.
> Implementing this in Gimp and in Nautilus.
>
> I studied the commandline options ( -n, -a, -i, -d, -f, -s )of gimp and do
> not know if it is possible. Am i right i have to load and unload
> all the images of a directory to get gimp generating an thumbnail or is
> there a better way?
I recommend you to use gimp-console instead of gimp; The GUI is
irrelevant to what you're doing.
Briefly, you need to:
1. Load the image
2. Generate the thumbnail
3. Delete the image from memory (using gimp-image-delete)
for each image in the list of images.
For a start, invoking gimp-console once for each image is fine.
Later I suggest you run gimp-console only once, for greatly increased
speed (make gimp's scripting loop over the files, rather than your
scripting.). You could do this very easily if you can rely on
gimp-python being installed on the users' machines, and use that
instead of Script-Fu. (you can also write a loop in Script-fu, but I
have very little idea HOW.)
More information about the Gimp-developer
mailing list