Re: premultiplying alpha
Re: premultiplying alpha
- Subject: Re: premultiplying alpha
- From: David Duncan <email@hidden>
- Date: Tue, 4 May 2010 09:30:49 -0700
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. Because of this, I've dived in, and attempted to write my own premultiplication, but something is going very wrong. Some images are coming out a quarter of the width they went in, others coming out completely empty...
Before diving too deeply into you code, why do you want to do this manually? Why not just create a second NSBitmapImageRep with the geometry that you desire, then draw the first into the second? This should do the premultiplication for you as well as cover any format that NSBitmapImageRep supports, rather than the ones that you manually code (as well as being more efficient since we've spent the effort to performance optimize those conversions).
--
David Duncan
Apple DTS Animation and Printing
_______________________________________________
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