Re: [CSS3-images] premultiplied alpha (was rotate(<angle>[, <translation-value>, <translation-value>]))

On Tuesday 2012-02-21 10:40 -0800, Rik Cabanier wrote:
> specifying premultiplied alpha to fix the issue seems odd.
> It seems that the issue is really how to you handle the  'transparent'
> keyword. Because transparent is specified as (0,0,0,0) you transition the
> color values  as well.
> So, non-premultiplied red->transparent, the midpoint of your gradient
> becomes (0, .5, 0, .5) which after compositing with white becomes (.5, .75,
> .5) which is too dark.
> In premultiplied space, you end up with (.5, 1, .5) which is what you want.
> 
> However by forcing premultiplied space, you can no longer go from 'yellow'
> to 'transparent red' because the 'red' value is removed when you multiply
> by 0.
> 
> Was this discussed and deemed OK? I tried to find it in the archives but
> couldn't find it.
> Sorry if this was already decided.

I believe it has been discussed a number of times.

There are effects that one can achieve with either premultiplied
alpha or nonpremultiplied alpha that cannot be achieved with the
other.  Choosing premultiplied means optimizing for the normal case
rather than the odd feature of transition to transparent + color.

-David

-- 
𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla                           http://www.mozilla.org/   𝄂

Received on Tuesday, 21 February 2012 18:54:06 UTC