Gimp-Forum.net
migrating 2.8 bash scripts to gimp 3 - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: Extending the GIMP (https://www.gimp-forum.net/Forum-Extending-the-GIMP)
+---- Forum: Scripting questions (https://www.gimp-forum.net/Forum-Scripting-questions)
+---- Thread: migrating 2.8 bash scripts to gimp 3 (/Thread-migrating-2-8-bash-scripts-to-gimp-3)

Pages: 1 2


RE: migrating 2.8 bash scripts to gimp 3 - vince - 03-10-2026

(03-10-2026, 07:49 AM)MrsP-from-C Wrote: Looks like it's a GEGL Operation now:
https://gegl.org/operations/gegl-color-to-alpha.html

No idea how to handle those in script-fu.
But you'll find examples for similar procedures in clothify.scm, if you search for gegl:

Thanks for your advice,
V.

Quite in a hurry at work, I definitely must give up the initial idea to update my numerous scripts to gimp 3.

For the record, and maybe could it be helpful to someone else, I lazily opt to run them on a gimp 2.10 Appimage (picked from here)


Code:
/opt/gimp-2.10/gimp-2-10-38-overlay-py2-mm-v2.AppImage -i -b \
"(\
    let* (\
        (image (car (file-png-load 0 \"input.png\" \"input.png\")))\
        (drawable (car (gimp-image-get-active-drawable image)))
    )\
    (gimp-drawable-desaturate drawable 0)\
    (gimp-drawable-invert drawable 0)\
    (plug-in-colortoalpha 1 image drawable '(0 0 0))\
    (gimp-file-save 1 image drawable \"output.png\" \"output.png\")\
    (gimp-quit 0)\
    )" 2 > /dev/null

Thank you all for your commitment,
Vince.