this is my first script-fu for gimp and it gives me "illegal function" when i try to execute it there.
(define
(
script-fu-c64ize
filename
width
height
)
(let*
(
(image 0)
)
(image (gimp-file-load 1 filename filename))
(gimp-image-scale-full image width height 2)
(gimp-image-scale-full image (/ width 2) height 0)
(gimp-image-convert-indexed image 1 4 16 FALSE FALSE "C64")
(gimp-image-scale-full image (* 4 width) (* 4 height) 0)
(drawable (car (gimp-image-get-active-layer image)))
(gimp-file-save 1 image drawable filename filename)
(gimp-ima开发者_如何学Pythonge-delete image)
)
)
maybe someone more experienced can spot the error and i feel i missed something fundamental (or it's just a stupid mistake). i'm still struggling with the docs.
thanks!
In
(image (gimp-file-load 1 filename filename))
you're calling image
as a function, but immediately before, it is bound to a number. Since numbers aren't functions, this will result in an error.
I'm not familiar with Script-fu, but if I were to guess, I'd replace the (image 0)
binding form with the one above.
精彩评论