On Mon, 15 Dec 2003 20:30:06 +0100, David Neary <[EMAIL PROTECTED]> wrote:
> RaphaŽl Quinet wrote:
> > The whole point of this discussion was based on the fact that because
> > we use post-multiplied alpha, there is some ambiguity about whether
> > the average user is supposed to know and rely on the RGB values of
> > transparent pixels.  If we had been using pre-multiplied alpha, then
> > there would be no reason for any debate, because all transparent
> > pixels would have R, G and B = 0.
> 
> You believe that allowing the RGB data behind transparent pixels to 
> be exposed might be confusing to some users - so far in the
> thread you are the only one who has asserted this. 

This is close to what I wrote, but not quite.  My main concern is not
that some users might be confused, but that the new feature that was
recently introduced implies that the users should percieve the alpha
channel as a simple hiding mechanism, which is wrong.

I will not repeat all arguments, but basically "alpha = hiding" may be
true (currently) for the images that were edited in one session, but
may not be true for images loaded from disk or processed by some
plug-ins.  On the other hand, the concept "alpha = undefined" is safer
and works in all cases.  In addition, it allows us to optimize some
parts of the GIMP (or GEGL) later.

> You consider that in certain circumstances this behaviour could
> be considered a bug.

Yes, because presenting undefined data to the user should be avoided.

In this case "undefined" is taken from the user's point of view: the
value of the data depends mostly on arbitrary implementation decisions
and the average user should not have to be aware of these internal
details.  GIMP developers and advanced users may take advantage of
their knowledge of the GIMP internals, but this should not be expected
from most users.

> Others have stated that there are several applications where
> transparent data is stored across sessions, and that this data is
> indeed useful, and not at all undefined. 

This is true in some cases, but not all.  I am mostly concerned about
the cases for which this is not true.  By promoting a perception of
the alpha channel that is not always correct, we are encouraging the
user to expect some things that cannot be guaranteed.  This can
indirectly lead to data loss if the user's expectations cannot be
fulfilled now or in the future.  I would prefer to follow the
principle "better be safe than sorry" and leave the advanced features
to hackers and advanced users who have a better knowledge of the
current GIMP internals.

> Perhaps
> we could have a filter that pre-multiplies layers by their alpha
> channel? That would be trivial to write, and would address
> RaphalŽl's concerns, while staying true to the principle I
> outlined.

I don't see how using pre-multiplied alpha would help.  This would be
a regression and it would not solve any problems, AFAIC.

-RaphaŽl
_______________________________________________
Gimp-developer mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer

Reply via email to