This takes a few lines of calls to imagemagick/gm or ~10 lines of python + Pillow.
Do you have any resources how to do this in GIMP?
After googling for a good while, I could not for the life of me figure out how to even get started with this.
I don't want to write an extension for GIMP - I want to use GIMP like I would an image manipulation library.