Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
migrating 2.8 bash scripts to gimp 3
#6
(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\")\
)"
gimp still complains, and once again I can't figure out what is going wrong. The error is:
Code:
Error: in script, expected type: numeric for argument 1 to gimp-drawable-desaturate

Does this mean that gimp-drawable-desaturate expects a number (sort of index of drawables) instead of my declared my-drawable layer?
I'm puzzled.
Reply


Messages In This Thread
RE: migrating 2.8 bash scripts to gimp 3 - by vince - 2 hours ago

Forum Jump: