[Gimp-developer] thumbnail generation for nautilus via gimp
Eckhard M. Jäger
bart at neeneenee.de
Wed Dec 5 08:30:32 PST 2007
Hello David,
thanks for the feedback. the script is well formed. The indention get
lost pasting into
Evolution mailer.
I didn't get any error or message on the concole :(
-
|\/\/\/|
| |
| (O)(O) Bart.
C _) bart at neeneenee.de
| ,_/
| / - Ich bin nicht berechtigt Aushilfslehrer zu feuern -
/ \
http://www.neeneenee.de
Am Mittwoch, den 05.12.2007, 09:17 +1030 schrieb David Gowers:
> Hi Eckhard,
>
> On Dec 5, 2007 6:54 AM, Eckhard M. Jäger <bart at neeneenee.de> wrote:
> >
> > 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
> If there is really no indentation here, this will cause an IndentationError.
> You can see GIMP reports such errors on the terminal it was run from;
> so while you are debugging I recommend you run GIMP from an xterm.
>
> >
> > 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 _) bart at neeneenee.de
> > | ,_/
> > | / - 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 <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.)
> >
> >
> >
> > _______________________________________________
> > Gimp-developer mailing list
> > Gimp-developer at lists.XCF.Berkeley.EDU
> > https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /lists/gimp-developer/attachments/20071205/ebf471bc/attachment-0001.html
More information about the Gimp-developer
mailing list