• 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: Mon, 25 Jun 2007 10:31:16 -0700

On Jun 25, 2007, at 10:25 AM, Chiharu Hirono wrote:

I must add that I needs output of PNG file. Can I get PNG without pre-multiplied data
from CGImageRef made by CGImageCreateWithImageInRect?

What you start with is what you get. CGImageCreateWithImageInRect shares data with the original image, so if the original image data is not pre-multiplied, then you get data that isn't pre-multiplied.


Your following answer means that I can't get RGBA bitmap without pre-multiplied data
from CGImageRef, so I think that If I make PNG from this RGBA bitmap, the PNG file
is pre-multiplied.
Is this right?

If you draw to a bitmap context, your data will be pre-multiplied. I don't know what goes on inside Image I/O if you hand it a pre- multiplied image, but I would imagine that if the format your requesting supports pre-multiplied images, then that will be what you get.
--
David Duncan
Apple DTS Quartz and Printing
email@hidden



_______________________________________________

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

  • Prev by Date: Re: Super-sized NSDrawer
  • Next by Date: Re: How to render 8-bit bitmap image representation?
  • Previous by thread: Re: Obtaining unpremultiplied bitmap from PNG file
  • Next by thread: Re: Obtaining unpremultiplied bitmap from PNG file
  • Index(es):
    • Date
    • Thread