开发者

Script-Fu giving me "Illegal Function"

开发者 https://www.devze.com 2023-03-28 02:10 出处:网络
this is my first script-fu for gimp and it gives me \"illegal function\" when i try to execute it there.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号