W3C home > Mailing lists > Public > www-style@w3.org > February 2012

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

From: L. David Baron <dbaron@dbaron.org>
Date: Tue, 21 Feb 2012 10:53:38 -0800
To: Rik Cabanier <cabanier@gmail.com>
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, www-style list <www-style@w3.org>
Message-ID: <20120221185338.GA29031@pickering.dbaron.org>
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.


𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla                           http://www.mozilla.org/   𝄂
Received on Tuesday, 21 February 2012 18:54:06 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:56 UTC