• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: premultiplying alpha
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: premultiplying alpha
      • From: Ken Ferry <email@hidden>
References: 
 >premultiplying alpha (From: Thomas Davie <email@hidden>)

  • Prev by Date: premultiplying alpha
  • Next by Date: Menubar in fullscreen oddity
  • Previous by thread: premultiplying alpha
  • Next by thread: Re: premultiplying alpha
  • Index(es):
    • Date
    • Thread