Editing rendered image with some custom code

Ive tried a for a bit but cant figure out if this is possible or not. Essentially I would like to be able to edit a frame via some custom code as soon as the frame is rendered, either as part of compositing or after compositing.
Cant find any good information about creating custom compositor nodes via BPY, so not sure if its possible. Not particularly sure about any other approaches I could take either.
Any suggestions appreciated :slight_smile:

You can do many things with python. I made an addon that loads rendered images and puts them in a sprite sheet.
But of course, it depends on your needs. How do you want to alter the rendered images?

Ideally I would like to be able to execute custom code which could perform theoretically any edit to an image during compositing, if this isn’t possible without editing and compiling blender source code (I doubt it is honestly) then I guess I could try something along the lines of reading, editing and overwriting images after they have been rendered. Easiest way to edit images post-render is obviously to just write them onto the disk, then everything becomes very simple but it does mean you cant view the edits from inside blender.

I think a better title for this post may have been “Custom compositing code”