On Thu, 28 May 1998, Jules Bean wrote:
> On 28 May 1998 [EMAIL PROTECTED] wrote:
>
> >
> > Ok, say I have an rgb value, and say I have another rgb value with an
> > associated alpha value - if the latter is "placed" over the former,
> > how does one figger out the resulting rgb values?
> >
> > My-computer-(usually-)does-my-math-for-me-ly yours,
> > jim
>
> I'm not sure this is strictly on-topic, but:
>
> Current value = (r1,g1,b1)
>
> Superimposed value = (a2,r2,g2,b2);
>
> new value := (1-a2) * (r1,g1,b1) + a2 * (r2,g2,b2)
>
> Where all values are in the range [0,1]
Doh. Got it the wrong way round.
Swap the (1-a2) and the a2
J
/----------------+-------------------------------+---------------------\
| Jelibean aka | [EMAIL PROTECTED] | 6 Evelyn Rd |
| Jules aka | | Richmond, Surrey |
| Julian Bean | [EMAIL PROTECTED] | TW9 2TF *UK* |
+----------------+-------------------------------+---------------------+
| War doesn't demonstrate who's right... just who's left. |
| When privacy is outlawed... only the outlaws have privacy. |
\----------------------------------------------------------------------/
-
To unsubscribe from this list send mail to: [EMAIL PROTECTED]
with the message contents: unsubscribe e-develop