• 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: 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

References: 
 >premultiplying alpha (From: Thomas Davie <email@hidden>)
 >Re: premultiplying alpha (From: David Duncan <email@hidden>)
 >Re: premultiplying alpha (From: Ken Ferry <email@hidden>)

  • Prev by Date: Re: [[NSFileManager alloc] init] considered thread-safe
  • Next by Date: Re: Drawing glitches in NSTableView with variable row hight (just like Console.app)
  • Previous by thread: Re: premultiplying alpha
  • Next by thread: Menubar in fullscreen oddity
  • Index(es):
    • Date
    • Thread