• 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: CGImageRef to bitmap context? [SOLVED]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: CGImageRef to bitmap context? [SOLVED]
      • From: Scott Thompson <email@hidden>
References: 
 >CGImageRef to bitmap context? (From: Mike McNamara <email@hidden>)
 >Re: CGImageRef to bitmap context? (From: Scott Thompson <email@hidden>)
 >Re: CGImageRef to bitmap context? [SOLVED] (From: Mike McNamara <email@hidden>)
 >Re: CGImageRef to bitmap context? [SOLVED] (From: Scott Thompson <email@hidden>)

  • Prev by Date: Re: Tidy up before saving
  • Next by Date: Re: Cocoa and PICT
  • Previous by thread: Re: CGImageRef to bitmap context? [SOLVED]
  • Next by thread: Re: CGImageRef to bitmap context? [SOLVED]
  • Index(es):
    • Date
    • Thread