On 09/16/2011 02:20 AM, David Gowers (kampu) wrote:
In GEGL, the layer mode code is autogenerated from formula strings -- see operations/generated/math.rb

The opacity behaviour is not documented there, but my understanding is that the alpha of the underlying composite is preserved, and opacity only effects how much of the layer's COLOR channels are applied (per the standard blending formula).

On Fri, Sep 16, 2011 at 7:09 AM, Ofnuts <ofn...@laposte.net <mailto:ofn...@laposte.net>> wrote:

    I'll trying to find out what happens when a layer is in subtract mode
    with a global opacity not one or zero (i.e. what computations are done
    with the pixels values of the composite image of the layers below, the
    pixel values of the layer, and the general opacity). I have a git
    extract of the Gimp source code (and of gegl & babl) but got
    lost... Can
    someone help?

Well, I know that in "Normal" mode, I have in each RGB channel:


(assuming "Under" is fully opaque), but in Subtract mode, I would have several possibilities


and $deity knows what else.

math.rb isn't taking the opacity in account (but is an interesting read...)


Gimp-developer mailing list

Reply via email to