Nick Lamb wrote:
> On Sun, Jul 16, 2000 at 05:37:56PM +1000, David Hodson wrote:
> > OK, this has been bugging me for some time. I'm convinced that Gimp's
> > alpha handling is wrong, in more than a few places.
> OK, but please provide some concrete examples...
> > To start with, there should be a clear distinction between alpha, which
> > is a transparency channel in an image and should always scale the pixel
> > colour values; and masks, which serve to select areas of an existing
> > image. (Yes, I know not all rgba images are pre-multiplied. They should
> > be.)
> Can you justify that (all images should be pre-multiplied)?
> Or is this just your unsupported opinion?
Well, that was attempted editorial humour to some extent, but it's also
the opinion of (for example) Jim Blinn, and Thomas Porter and Tom Duff.
I'd hardly call it unsupported.
> > At the moment, as far as I can tell, the Gimp cannot handle
> > pre-multiplied rgba images.
> Gimp has no support for pre-multiplied alpha,
Well, there's my answer. No support.
> and I don't see any reason
> to change this because it's just a hack.
A hack? I thought it was a mathematically elegant representation of
an image layer, which is why I see a reason to support it. I'm trying
to find out if anyone else agrees, or if I'm missing something that's
already there, or there's something specific about Gimp and the way
it's used that makes it unnecessary or not useful.
And even if you consider it a hack, don't people use pre-mult alpha?
Am I the first one to notice this and complain?
> The Gimp TIFF loader tries its
> best to convert pre-multiplied alpha images, but loading TIFFs is an
> unending struggle. The format should be put out of its misery ASAP (but
> see all previous Gimp discussions on TIFF for reasons why it stills
> stalks the earth).
I have no love at all for the TIFF format. (I was present at the birth
a similarly over-extended format. I should have complained more loudly.)
But that's irrelevant - or at least orthogonal - to the use of pre-mult
> [...] Maybe you could send me some sample images off-list and I
> will look at them.
I've placed a page at:
Images are just inline PNGs, just grab 'em as they appear; but it's not
really necessary, if you say that Gimp doesn't handle pre-mult alpha,
then that explains the results.
> > At the same time, much of the code for handling alpha data seems to
> > unscale and rescale the colour channels. [...]
OK, just had a look at the transform code and realised what it does -
"unscale and scale" is actually converting the non-premultiplied alpha
pre-multiplied alpha to do the transform! Hmmm...
Do users have problems with pre- and non-mult alpha?
David Hodson -- [EMAIL PROTECTED] -- this night wounds time