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

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

 



On Wed, Jul 19, 2000 at 12:53:31AM +1000, David Hodson wrote:
> > 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.

Ah, but as others have said, these are people working in a totally
different area, and at least Tom Duff is most famous for a speed-up hack
easily as ugly as pre-multiplied alpha (Duff's device).

> > Gimp has no support for pre-multiplied alpha,
> 
> Well, there's my answer. No support.

... and no need for it. With the exception of (IMHO useless) out-of-gamut
RGB values, each is equally expressive, plug-ins and tools are free to
convert to pre-mult if appropriate but the core uses ordinary RGBA.

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

Let's rather say "Not a priority" rather than "not useful", but I do
not expect pre-mult alpha to be exposed to the user (as opposed to
used in plug-ins or for speed-up hacks) in Gimp any time soon.

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

Notice? I don't know. Complain, yes. You'll see why in a minute I think.

> I have no love at all for the TIFF format. (I was present at the birth
> of 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
> alpha.

I'm not aware of any other common interchange format which supports the
pre-multiplied alpha representation in storage. If we didn't have to load
or save it, pre-mult would not be a problem for Gimp.

> I've placed a page at:
> 
> www.ozemail.com.au/~hodsond/alpha.html
> 
> 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.

<sigh> No the program which produced your example PNG image is broken.
The PNG specification requires straight RGBA, pre-multiplied alpha is
prohibited and this is spelled out several times. Gimp can't hope to
interpret an invalid image correctly.

Please identify the program (name, version, vendor etc.) and I will pass
the details on to png-implement. Hopefully we can arrange for them to
issue an urgent update to their users and if necessary get publicity so
that everyone knows not to use this broken program.

> Do users have problems with pre- and non-mult alpha?

Since they are equivalent I'd guess users remain comfortably unaware.

Nick.


[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