Re: premultiplying alpha
Re: premultiplying alpha
- Subject: Re: premultiplying alpha
- From: Thomas Davie <email@hidden>
- Date: Wed, 5 May 2010 10:55:38 +0100
On 5 May 2010, at 06:05, Ken Ferry wrote:
>
> On Tue, May 4, 2010 at 9:30 AM, David Duncan <email@hidden> wrote:
> On May 4, 2010, at 8:57 AM, Thomas Davie wrote:
>
> > After much searching about, I discovered (contrary to what the docs say), that NSBitmapImageReps do not always premultiply their r/g/b by their alpha.
>
> I think you're misreading something. NSAlphaNonpremultipliedBitmapFormat exists. :-)
Indeed, but nearly the first thing the documentation says is:
"If a coverage (alpha) plane exists, a bitmap’s color components are premultiplied with it. If you modify the contents of the bitmap, you are therefore responsible for premultiplying the data. For this reason, though, if you want to manipulate the actual data, an NSBitmapImageRep object is not recommended for storage. If you need to work with data that is not premultiplied, you should use Quartz, specificallyCGImageCreate with kCGImageAlphaLast."
This is repeated variously through the documentation, with no mention of the alphaNonPremultiplied format except in the constants section.
I've filed a documentation bug report :)
Bob_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden