(6 hours ago)programmer_ceds Wrote: In this case you need gimp-image-get-selected-drawables which returns a list of the selected drawables.
Use "Help/Procedure Browser" to search for key words in the functions that you need to updated.
Also looking at the built-in scripts may help you.
Thank you for your help,
yes, I've struggled with this solution, but it seems there's something I don't do the right way to handle the array of drawables.
This works:
Code:
gimp -i --quit --batch-interpreter=plug-in-script-fu-eval -b \
"(\
let*(\
(image (car (file-png-load 1 \"input.png\")))\
)\
(gimp-file-save 1 image \"output.png\")\
)"Code:
gimp -i --quit --batch-interpreter=plug-in-script-fu-eval -b \
"(\
let*(\
(image (car (file-png-load 1 \"input.png\")))\
(drawable (vector-ref (gimp-image-get-selected-drawables image) 0))\
)\
(gimp-file-save 1 image \"output.png\")\
)"throws me the following error:
Code:
Error: vector-ref: argument 1 must be: vectorI'm sorry in advance for my poor knowledge of this Scheme syntax...
