W3C home > Mailing lists > Public > www-svg@w3.org > July 1999

Re: pre-multiplied alpha in filter effects, again

From: Fredrik Lundh <fredrik@pythonware.com>
Date: Mon, 12 Jul 1999 19:21:41 +0200
Message-ID: <01cf01becc8b$03c90a20$f29b12c2@secret.pythonware.com>
To: <www-svg@w3.org>
Christian Brunschen <cb@df.lth.se> wrote:
> Regardless of how good accuracy you might have in your premultiplied RGB
> values - ie, even if they get stored as 80-bit IEEE floating-point - there
> is one case where it is impossible to recreate the non-premultiplied RGB
> values, if you only have the premultiplied ones and the Alpha value. I am
> talking, of course, of the case when Alpha = 0, ie, the pixel in question 
> is fully transparent.

it's not "fully transparent" -- it simply doesn't "exist".
and non-existent pixels inside the image are no
different than the infinite number of pixels outside
the image rectangle...

> One simply can't divide the premultiplied RGB values
> (which are all zero due to premultiplication) by the Alpha value (also
> zero) and expect to retreive the original pixel value.

    "Thus, for all practical purposes, a trans-
    parent pixel ceases to exist conceptually.
    This is profound because suddenly images
    change from rectangular items to shaped
    objects with partial transparencies. This
    is largely what humans mean by a visual

(from "Alpha and the history of digital compositing"
by Alvy Ray Smith (1)).

> Remember, PNG stores non-premultiplied Alpha.

yeah, but other future image sources might not
be able to provide premultiplied pixels...

> Of course, this is only one possible solution, but I do dare suggest that
> the problem,and thus the question, should be taken into consideration.

sure, but maybe the best way to deal with pixels that
don't exist is to treat them as they don't exist -- or in
other words, if you're filling empty regions in an image,
you must explicitly specify what to fill them with.


1) available as technote #7 from
make sure to read technotes #4 and #6 too!
Received on Monday, 12 July 1999 13:19:12 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:53:47 UTC