Re: Script-fu gimp-file-save-thumbnail function | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
Hi Joao,
> May I suugest this code instead of the above? :
>
> from gimpfu import *
> def python_fu_create_thumb(filename):
> img = pdb.gimp_file_load(filename, filename)
> pdb.gimp_file_save_thumbnail(img, filename)
>
> register (
> "python-fuc-create-thumb",
> "Create Thumbnail of Image File",
> "Create Thumbnail of Image File",
> "Marty Bradley",
> "Marty Bradley",
> "jan 2008",
> "",
> "<Toolbox>/Xtns/Script-Fu/Utils/Thumbnail...",
> [(PF_FILENAME, "Image Name". "Filename of the iamge to create
> thumbnail", "")],
> [],
> python_fu_create_thumb
> )
> main()
I don't want to try to get your code working because I know nothing
about Python, I know it is a good language. The other reason I'm not
happy using it is that it adds another layer of software to a solution
that should work on its own.
I have still been unable to get the following to work.
(define (script-fu-create-thumb filename)
(let* ((img 0))
;; car needed here because gimp functions return values as lists
(set! img (car (gimp-file-load 1 filename filename)))
(gimp-file-save-thumbnail img filename)))
(script-fu-register "script-fu-create-thumb"
"<Toolbox>/Xtns/Script-Fu/Utils/Thumbnail..."
"Thumbnail Image"
"Marty Bradley"
"Marty Bradley"
"Dec 2007"
""
SF-FILENAME "Image Name" " ")
Any other pointers would be gladly accepted.
regards,
Martin.
_______________________________________________
Gimp-user mailing list
Gimp-user@xxxxxxxxxxxxxxxxxxxxxx
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
[Home] [GIMP Development] [Video For Linux] [Photo] [Yosemite News] [Yosemite Photos] [Yosemite Book Store] [gtk] [KDE] [Scanner] [Gimp's Home] [Gimp Docs] [Gimp on Windows] [Steve's Art] [Webcams] [Share Your Images] [Free Online Dating] [Script Fu]
![]() |
![]() |