• 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: Obtaining unpremultiplied bitmap from PNG file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Obtaining unpremultiplied bitmap from PNG file


  • Subject: Re: Obtaining unpremultiplied bitmap from PNG file
  • From: David Duncan <email@hidden>
  • Date: Thu, 14 Jun 2007 10:57:53 -0700

On Jun 13, 2007, at 2:28 PM, Shamyl Zakariya wrote:

As far as I can tell, Cocoa simply won't give you non-premultiplied bitmap data. The CG constant kCGImageAlphaLast ( IIRC ) is there, but isn't actually implemented.

kCGImageAlphaLast is implemented and fully supported for creating a CGImageRef. What is not implemented is creating a bitmap context (via CGBitmapContextCreate) that does not use pre-multiplied alpha. The distinction is subtle, but practically it means that you can create an image that does not used pre-multiplied alpha, but in the current API you cannot obtain the pixel data from that image into your own buffer without getting it pre-multiplied.


On Jun 14, 2007, at 2:34 AM, Barry wrote:
How do I access the pixel data of a CGImage object?
at
http://developer.apple.com/qa/qa2007/qa1509.html

Is this a solution ???

This Q&A demonstrates obtaining the pixel data via a bitmap context, which as above requires you to work with pre-multiplied data.
--
David Duncan
Apple DTS Quartz and Printing
email@hidden



_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: Obtaining unpremultiplied bitmap from PNG file
      • From: Chiharu Hirono <email@hidden>
    • Re: Obtaining unpremultiplied bitmap from PNG file
      • From: Steve Christensen <email@hidden>
References: 
 >Obtaining unpremultiplied bitmap from PNG file (From: Chiharu Hirono <email@hidden>)
 >Re: Obtaining unpremultiplied bitmap from PNG file (From: Shamyl Zakariya <email@hidden>)

  • Prev by Date: Re: CGBitmapContextCreate fo Lab colorSpace
  • Next by Date: Re: Obtaining unpremultiplied bitmap from PNG file
  • Previous by thread: Re: Obtaining unpremultiplied bitmap from PNG file
  • Next by thread: Re: Obtaining unpremultiplied bitmap from PNG file
  • Index(es):
    • Date
    • Thread