Re: pre-multiplied alpha in filter effects, again

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
    object."

(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.

</F>

1) available as technote #7 from
ftp://ftp.research.microsoft.com/Users/alvy/
make sure to read technotes #4 and #6 too!

Received on Monday, 12 July 1999 13:19:12 UTC