Re: [Fwd: Pre-multiplication of samples in Filter Effects]

On Wed, 2 Jun 1999, Raph Levien wrote:

> Peter Graffagnino <pgraff@apple.com> wrote:
> > These are good comments. The general rule is that for things that  
> > manipulate color independent of coverage, premultiplication is not  
> > convenient.  But for things that manipulate the image as a whole,  
> > premultiplication is more natural.  For example, I disagree with the  
> > analysis of the GaussianBlur case.  To correctly evaluate a  
> [...]
> 
> Indeed, all such convolution operations in the Gimp are implemented by
> going to premultiplied space, doing the operation, and going back to
> separate-alpha space (which is the interchange format). In earlier
> versions, this was not done, and we had lots of nice artifacts when
> gaussian-blurring partially transparent white layers.
> 
> I would disagree that, in general, premultiplied alpha is a
> significant loss of precision. Yes, when converting back to separate
> alpha in the small-alpha case, roundoff errors get magnified. But when
> you take that pixel and composite it over another pixel, you only get
> an LSB or so of roundoff errors. For Web work, that should be
> completely satisfactory.

But the magnified roundoff error might be pushed through into a
ColorMatrix filter rather than being immediately composited onto something
else; and in that case, the magnified roundoff error can result in, well,
truly weird results beyond the rightful expectations of the user.

> Now, if we're talking about high-quality print applications, then 8
> bits is simply not adequate. Going to 16 bits, premultiplied or no,
> is the only way to go. My take on the draft is that it's not being
> targeted for high-quality printing. Too bad; SVG has a lot of stuff in
> it that would be great for that application. 

Indeed. Perhaps including a parameter that would allow the user to select
from a few bit-depths (8 bpp, 16 bpp, 32bpp?) to be used in the filter
effects stage?

> Maybe SVG2...
>
> Raph

// Christian Brunschen

Received on Thursday, 3 June 1999 06:36:37 UTC