Re: CGImageRef to bitmap context? [SOLVED]
Re: CGImageRef to bitmap context? [SOLVED]
- Subject: Re: CGImageRef to bitmap context? [SOLVED]
- From: David Duncan <email@hidden>
- Date: Mon, 13 Aug 2007 11:10:54 -0700
On Aug 13, 2007, at 10:00 AM, Scott Thompson wrote:
You should realize that, even though a CGImage represents a
rectangular array of color samples, the object does not have to
store it's contents in a Pixmap.
For example, if you create a CGImage using
CGImageCreateWithJPEGDataProvider
then the computer could store the JPEG data and decompress it
whenever you draw the image.
(This is what CGImage does in practice the last time I checked, but
as that is not documented behavior you should probably not rely on it)
Image IO (and the JPEG/PNG providers) do this by default. You can
request that Image IO not do this using the kCGImageSourceShouldCache
property (set to true) when you request an image, but as it implies,
that is more of a request than a requirement. Unless you need maximum
drawing performance (and can prove that caching the image helps) you
should not specify this property, as it will consume considerably
more memory for each image loaded.
--
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