(06-20-2025, 06:28 AM)MrsP-from-C Wrote: Thank you, Ofnuts.
I'll give that a try.
But honestly: this could be done right in GIMP from the start.
This would be heavily language dependent, and the idea here is that Gimp provides language agnostic interface.
As need arises and because I'm a lazy programmer, I've written a gimphelpers module that makes things a lot simpler (at least for me) by cutting off the boilerplate. This includes the function above but many other things, with the idea to help your IDE tell you in advance that you are talking nonsense.
You can have a peek and are welcome to use it (or even contribute...), see here.