Re: thumbnail generation for nautilus via gimp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hello,

i have written my Gimp python plugin so far:

#!/usr/bin/python

from gimpfu import *
import os
import os.path

def python_thumbnailer(this_path):
  image_formats = [
    ".psd",
    ".xcf",
    ".rgb"
  ]
  num_files = len (os.listdir(this_path))
  all_files = os.listdir(this_path)
 
  for this_file in range(num_files):
    this_ext = ''
    this_filepath = this_path+"/"+all_files[this_file]
    if os.path.isfile(this_filepath):
      this_ext = splitext(this_filepath)[1]
   
      if this_ext in image_formats:
        pdb.gimp_file_load(this_filepath,this_filepath)
        pdb.gimp_file_save_thumbnail(this_filepath,this_filepath)
        pdb.gimp_image_delete(this_filepath)
  pdb.gimp_quit(0)
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()


But when i try to execute it with
gimp-console  -i -n -f -d -s -b '(python_thumbnailer RUN-NONINTERACTIVE "/home/agy/psd_samples")'

i get always
batch command: experienced an execution error.

Did somebody know what is wrong?
Thanx.

-  
 |\/\/\/|
 |      |
 | (O)(O)        Bart.
 C      _)       bart@xxxxxxxxxxxx
 |   ,_/
 |   /    - Ich bin nicht berechtigt Aushilfslehrer zu feuern -
 /   \
                  http://www.neeneenee.de

_______________________________________________
Gimp-developer mailing list
Gimp-developer@xxxxxxxxxxxxxxxxxxxxxx
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux