On Tue, Jul 18, 2000 at 09:41:49PM -0400, Garry R. Osgood wrote:
> David Hodson wrote:
> > "Steinar H. Gunderson" wrote:
> >
> > > GIMP already does this (32-bit = RGBA, the `extra' 8 bits is an alpha channel,
> > > used for transparency information), and has done for a long time now.
> Calvin Williamson recommended "Image Composition
> Fundamentals" by Alvy Ray Smith, for a review
> and advantages of the technique.
> http://www.alvyray.com/Memos/default.htm.

Another great reference is Blinns two chapters on Compositing
in his "Dirty Pixels" book. 

He gives some other arguments (aside from elegance and efficiency) as to why
compositing and filtering with premultiplied alphas is better.

Eg He shows that if you want to downsample and then composite an image over
a background, thats different from compositing first and then downsampling
if you are using un-premultiplied images (you get different results that is). 
But with pre-multiplied images you get the same answer with either order.  

So aside from efficiency there are some arguments for "correctness"
when doing filtering operations and compositing. 

But of course pre-multiplied squashes out any color information
that might like to hang around in the color channels temporarily on
the way to a composite. 

So it depends on how you work with your images. You might not be
using the "compositing engine" part of the paint program at all. 
You might need to edit/paint the RGBs and Alpha for a layer more
or less independently. In this case Alpha=0  and  Color!=0
channels might be fine. Maybe the correct Alpha channel isnt even there
yet. Or maybe you are going to paint the alpha channel yourself.

Compositing programs tend to use premultiplied, but for painting programs
un-premultiplied is pretty common. Some paint programs do use premultiplied 


Reply via email to