(3 hours ago)rich2005 Wrote:Code:
rich@rich-3:~$ gimp -i --quit --batch-interpreter=plug-in-script-fu-eval -b \
"(\
let*(\
(image (car (file-png-load 1 \"input.png\")))\
(drawable (vector(gimp-image-get-selected-drawables image) 0))\
)\
(gimp-file-save 1 image \"output.png\")\
)"
(4 hours ago)MrsP-from-C Wrote:Code:
(drawable (vector-ref (car (gimp-image-get-selected-drawables image)) 0))
Thank you for these solutions! both suggestions succeed.
Perhaps did I miss it, is there an official documentation for the Scheme syntax? or should we just rely on a bunch of examples?
Happy to have landed on gimp-forum, thanks again.
V.
(2 hours ago)vince Wrote: Thank you for these solutions! both suggestions succeed.but then...
Code:
gimp -i --quit --batch-interpreter=plug-in-script-fu-eval -b \
"(\
let*(\
(image (car (file-png-load 1 \"input.png\")))\
(my-drawable (vector(gimp-image-get-selected-drawables image) 0))\
)\
(gimp-drawable-desaturate my-drawable 0)\
(file-png-export 1 image \"output.png\")\
)"Code:
Error: in script, expected type: numeric for argument 1 to gimp-drawable-desaturateDoes this mean that gimp-drawable-desaturate expects a number (sort of index of drawables) instead of my declared my-drawable layer?
I'm puzzled.
