Re: [Gimp-developer] Finding out what happens when compositing layers

2011-09-17 Thread Patrick Horgan
On 09/16/2011 09:31 PM, 丰 wrote:
 I came across this quite some time ago:
  http://www.simpelfilter.de/en/basics/mixmods.html

That's wonderful!  Even mentions GIMP a bit.

Patrick
___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


Re: [Gimp-developer] Finding out what happens when compositing layers

2011-09-16 Thread Ofnuts

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:

Composite=Over*alpha+Under(1-alpha)

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


Composite=Under(1-alpha)-Over*alpha
or
Composite=Under(1-alpha)+(1-Over)*alpha
or
Composite=Under(1-alpha)+(1-Over*alpha)

and $deity knows what else.

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

Thx.






___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


Re: [Gimp-developer] Finding out what happens when compositing layers

2011-09-16 Thread David Gowers (kampu)
On Sat, Sep 17, 2011 at 8:36 AM, Ofnuts ofn...@laposte.net wrote:

 **
 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 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:

 Composite=Over*alpha+Under(1-alpha)

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

 No, you just subtract Over from Under with no multiplication, then you
perform a RGB (not RGBA) Composite of the result and Under, to produce the
final composite.
___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


Re: [Gimp-developer] Finding out what happens when compositing layers

2011-09-16 Thread
I came across this quite some time ago:
 http://www.simpelfilter.de/en/basics/mixmods.html

-- 
2.6.32.26-175.fc12.x86_64
___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


Re: [Gimp-developer] Finding out what happens when compositing layers

2011-09-16 Thread
I came across this quite some time ago:
http://www.simpelfilter.de/en/basics/mixmods.html

PS: I thought I had type in my word before I send the mail. I did not
know what had happened. Sorry to everybody for the spam and wish this
mail is all right.
-- 
2.6.32.26-175.fc12.x86_64
___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


Re: [Gimp-developer] Finding out what happens when compositing layers

2011-09-15 Thread David Gowers (kampu)
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 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?
 ___
 Gimp-developer mailing list
 Gimp-developer@lists.XCF.Berkeley.EDU
 https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer