On Fri, 12 Dec 2003 14:41:08 -0600, "Stephen J Baker" <[EMAIL PROTECTED]> wrote:
> MIPmapping works by creating successively reduced resolution images -
> each (typically) half the resolution of the previous one.
> When a MIPmapped image has alpha, this down-filtering produces semi-translucent
> pixels in areas of the image that were formerly completely transparent.

I don't follow your argument.  Even the simplest downsampling
techniques ("nearest neighbors", no linear or cubic interpolation)
work by combining the weighted values of the pixels (all colors are
weighted by their opacity).  So the relative weight of a fully
transparent pixel is zero, which means that if you are filtering four
pixels (half resolution) and three of them are transparent, then the
result will only have the contribution of the fourth pixel, with a
lower opacity (1/4).  The fully transparent pixels will not contribute
to the downsampled result.

> If GIMP were to do something like (say) making all the transparent pixels
> be solidly black, you'd see a dark halo.  This is a really common problem
> and GIMP is the tool that saves you.

I don't see how this would happen, except if the downsampling filter
would be incorrectly processing the R, G, B and A values independently
(without weighting by A), which is obviously incorrect.  We had a
bunch of bug reports about GIMP plug-ins doing this incorrectly and
many of them have already been fixed thanks to the contributions of
David Necas (yeti) and others.  Follow the dependencies from:

If some other software has the same bugs as some of these plug-ins, I
don't think that it is the GIMP's job to make sure that the software
works despite its bugs.  Of course we should not break it on purpose
if we have no good reason to do it (i.e., if there is no other benefit
in clearing the transparent pixels) but we should not be prevented
from improving the GIMP even if that triggers some pre-existing bugs
in some other software.  We can implement specific workarounds if
someone thinks that it is worth it, though.

Gimp-developer mailing list

Reply via email to