Re: Obtaining unpremultiplied bitmap from PNG file
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