• 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: Bulletproof way to create a new CGBitmapContext from an existing image?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bulletproof way to create a new CGBitmapContext from an existing image?


  • Subject: Re: Bulletproof way to create a new CGBitmapContext from an existing image?
  • From: Demitri Muna <email@hidden>
  • Date: Fri, 06 Nov 2009 02:58:55 -0500

Hi Steve and David,

Thank you both for your comments; they were very helpful. I had thought that I had to match the context to the image I was going to use, but that's clearly wrong. I had missed that link to the supported pixel formats - that's very informative.

Steve's comment also suggested to me (if this will help) another trick. I created the context with the *cropped* image size. When I draw the image in the context, I specify a rect positioned such that the context region contains the bit I want cropped, i.e. specify a rect that is larger than the bounds of the context. CG scales it as appropriate, but I only get the bit that I want.

Again, thanks very much for the help!

Cheers,
Demitri

_______________________________________________

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: 
 >Bulletproof way to create a new CGBitmapContext from an existing image? (From: email@hidden)
 >Re: Bulletproof way to create a new CGBitmapContext from an existing image? (From: David Duncan <email@hidden>)

  • Prev by Date: Re: NSTreeController, Core Data and root objects
  • Next by Date: Re: IBOutlet getting messed up in the runtime
  • Previous by thread: Re: Bulletproof way to create a new CGBitmapContext from an existing image?
  • Next by thread: Re: Bulletproof way to create a new CGBitmapContext from an existing image?
  • Index(es):
    • Date
    • Thread