• 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 12:42:24 -0700

On Aug 13, 2007, at 11:30 AM, Scott Thompson wrote:

It also seems possible that CGImage could potentially store more than one representation behind it's façade. (I'm not trying to imply that it does, but it could). I could imagine where a CGImage contains more than one cached representation of an image... say for drawing the images into different destination color spaces. If you could ask the CGImage for a pixel, it wouldn't know which cached image it should take the pixel value from.

The current API doesn't really allow for that, as each image carries around it's complete specification (color space, pixel size, pixel format, etc). In theory the API could be extended to allow multiple data providers depending on certain conditions, but the API would have to be modified fairly extensively (you no longer have an image format, but a list of native formats, no longer one size, but multiple sizes, etc).


However, if you wanted to implement something like this, a CGImage itself isn't a very expensive structure to maintain (the image data is typically far more expensive, as are any cached representations that may be created when you draw it). If you wanted to do something like this, you could create a group of related CGImages and on-demand data providers that created the representation when you wanted it. Then you just use the appropriate image ref and the proper representation is created on demand.
--
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: Uli Kusterer <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>)
 >Re: CGImageRef to bitmap context? [SOLVED] (From: David Duncan <email@hidden>)
 >Re: CGImageRef to bitmap context? [SOLVED] (From: Scott Thompson <email@hidden>)

  • Prev by Date: Re: Need an alternative to Interface Builder for a good reason
  • 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