Re: 32-bit images in gimp - Alpha handling wrong?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



David Hodson wrote:
> 
> 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.

All three of whom come from a 3d rendered graphics background.  In the photo
manipulation/retouching realm it is very uncommon (and inconvenient) to have
a pre-multiplied alpha channel.

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

It really shouldn't matter to the end user weather we use pre-multiplied alpha
internally or not as long as we do the proper conversions on load/save (and
of course do the image manipulation properly WRT. alpha)

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

It depends on what you are doing weather pre multiplied alpha is useful
or not.  For compositing and image warping pre multiplied alpha is great.  for
color correction pre-multiplied alpha just gets in the way.  Since
pre-multiplying the alpha does throw away a few bits of information my
preference is for non-pre-multiplied alpha.

> 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?

I do quite a lot of graphics work and almost never use images
stored with pre multiplied alpha.  

I think it is quite likely that gimp 2.0 will have some support internally for
pre multiplied images if only for optimization reasons.

Jay Cox
jaycox@xxxxxxxx


[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux