Is there any raster graphics editor which can do the standard things, like rasterizing fonts, drawing shapes, working with layers, etc. but is also easy to extend with custom ‘filters’ (i.e. algorithms on a pixel matrix)? I know that Photoshop is extendable, via scripts and via Lua for actual plugins, that Lua route seemed a bit overkill for me to learn (with all the GUI stuff), and with scripts, I don’t know how effectively one can read and write image data. GPU acceleration and being free software would be sweet, but not mandatory. Ideally, I’d like to write the filters in Python, being able to use the OpenCV and Pillow libraries. Also, it would great if it would be possible to create filters with more than one input layer, so that you can e.g. apply a filter on two layers that are fed seperately into the algorithm (and possibly treated in different ways) to produce one output image.
As a simple example, assume I want to perform convolution to a layer, but with a different convolution matrix for each pixel. Say, the convolution matrix is the polynomial ax+by+cxy multiplied with some bump map and the parameters a, b, c are taken from the RGB values of another layer. It wouldn’t be hard to write a Python script that takes two images and performs exactly this, also GPU acceleration is feasible, but I’d like to integrate it smoothly into the workflow of some design software, it must not be the most powerful, but should cover the basic features.
[EDIT] OK, so I just learned there is GIMP Python, which should be basically what I was looking for. Also, apparently there is an image editor in Blender, which is also Python extendable. Still, I leave this open, just in case there are other options I don’t know of yet, or someone can comment on how it feels to do it in Photoshop, which is not free, of course, but still the software I’m most familiar with!
If you prefer python you should probably use numpy (or scipy) package, with PIL as loader. Basically for the speedup that you get from its matrix manipulation tool set gets you doing anything quite quickly (see here). Or if you want to do it in real time use OpenCV instead.
With your additions it seems clear that your not looking at all into a software with same calssification as photoshop or GIMP. Rather you want the other major line of pixel editors the comp application. Comp applications come in 2 versions basically after effects and node based.
The reason you usually see animators and vfx artst using node based apps is simply that a node based application gives animation for free of charge (with minimal complexity increase in other uses, but then animation is way more technical). And for this reason they also have very high emphasis of performance so they frequently compile your stuff into a gpu computation.
These are designed for your usecase, for the others its more incidental rather than the aim of the software.