Thanks for the hint, but I already ruled out that plugin because I have a lot of layers to selectively show/hide, then mask, then copy the flattened image to another one (to generate an animated sprite), and repeat. Doing a copy paste every time would quite defeat the idea of having a mask... And I don't have Paint.NET 4 for the moment.
To explain more precisely what I want : imagine a 1x1 image with 2 layers, layerA on top of layerB.
The pixel of layerA is 100% opaque red (in RGBA: [255, 0, 0, 255])
The pixel of layerB is 50% transparent white (in RGBA: [255, 255, 255, 128])
If you set layerA to be on multiply, the resulting pixel currently will be in RGBA: [255, 0, 0, 255]. However, that is not what I want, and it is also not correct. The result I expect is [255, 0, 0, 128], since:
- for R, 255 * 255 / 255 (the division to put the result between 0 and 255) is 255
- for G, 255 * 0 / 255 is 0
- for B, 255 * 0 / 255 is 0
- for alpha, the same formula should apply, so 255 * 128 / 255 is 128 (the result I want).
I hope I explained it clearly.
If it is possible to have additionnal blend modes as plugins, then I can create a plugin for that.