discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Pre-multiplied alpha


From: Alexander Malmberg
Subject: Re: Pre-multiplied alpha
Date: Fri, 12 Dec 2003 01:53:35 +0100

Alexander Malmberg wrote:
[snip]
> Does the image data stored in an NSBitmapImageRep have premultiplied
> alpha (aka associated alpha) or not (aka unassociated alpha)? The image
> data passed to NSDrawBitmap?

As it turns out (thanks Matt Rice :), the NSDrawBitmap docs explicitly
state that:

"""
In bitmap images with alpha, the color (or gray) components have to be
premultiplied with the alpha. This is the way images with alpha are
displayed, this is the way they are read back, and this is the way they
are stored in TIFFs.
"""

(The last part isn't completely true, but that doesn't really affect
things.) This directly answers the NSDrawBitmap part, and I guess we
want NSBitmapImageRep to be consistent with that.

Would have been easier to un-premultiply tiffs that needed it than it'd
be to premultiply png:s, though. :-/

- Alexander Malmberg




reply via email to

[Prev in Thread] Current Thread [Next in Thread]