Colors and Alpha
-
Hi, I need to calculate color, when I use two layers.. bottom layer have color:
r1,g1,b1,a1
and top layer have color:r2,g2,b2,a2
but I don't know how to calculate resulting color.:confused: Alpha component is:a=a1+a2*(255-a1)/255;
but I don't know other color components. (Only when
a1==255
=> bottom layer is opaque). Thanks for help! i'm only pointer to myself -
Hi, I need to calculate color, when I use two layers.. bottom layer have color:
r1,g1,b1,a1
and top layer have color:r2,g2,b2,a2
but I don't know how to calculate resulting color.:confused: Alpha component is:a=a1+a2*(255-a1)/255;
but I don't know other color components. (Only when
a1==255
=> bottom layer is opaque). Thanks for help! i'm only pointer to myselfalpha generally ignores the bottom layer. alpha usually only applies to the top image, it controls overlay transparency and the bottom alpha is unchanged by the overlay image. -c
When history comes, it always takes you by surprise.
-
alpha generally ignores the bottom layer. alpha usually only applies to the top image, it controls overlay transparency and the bottom alpha is unchanged by the overlay image. -c
When history comes, it always takes you by surprise.
Surely you must consider the alpha values of all images in the stack if there's a background layer? -- It's not unusual to be picked up by a klingon woman It's not unusual to have fun with a klingon When I see you kicking me around It's not unusual to see me cry, I wanna die
-
Surely you must consider the alpha values of all images in the stack if there's a background layer? -- It's not unusual to be picked up by a klingon woman It's not unusual to have fun with a klingon When I see you kicking me around It's not unusual to see me cry, I wanna die
just merge each layer onto the background, one at a time, in Z order. -c
When history comes, it always takes you by surprise.