Hello,

i started writing the internal Gimp script for looping over the images.
My code is so far the simple:

# -*- coding: utf-8 -*-

from gimpfu import *
import os
import os.path

def python_thumbnailer(this_image, this_path):
        a = this_path

register(
        "python-fu-thumbnailer",
        "Generating thumbnails",
        "Generating thumbnails for Nautilus via Gimp",
        "Eckhard M. Jaeger",
        "Eckhard M. Jaeger",
        "2007",
        "<Toolbox>/Xtns/Nautilus Thumbnailer...",
        "",
        [
                (PF_STRING, "this_path", "Directory Path", ""),
        ],
        [],
        python_thumbnailer)

main()

this script is copied into ~/.gimp-2.4/plug-ins but didn't appear
anywhere :(
I can't find the bug, please can somebody help me. Thanx.


-  
 |\/\/\/|
 |      |
 | (O)(O)        Bart.
 C      _)       [EMAIL PROTECTED]
 |   ,_/
 |   /    - Ich bin nicht berechtigt Aushilfslehrer zu feuern -
 /   \
                  http://www.neeneenee.de


Am Montag, den 03.12.2007, 19:20 +1030 schrieb David Gowers:

> Hi Eckhard,
> 
> On Dec 2, 2007 6:15 AM, Eckhard M. Jäger <[EMAIL PROTECTED]> 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.)
> 
_______________________________________________
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

Reply via email to