Re: Bulletproof way to create a new CGBitmapContext from an existing image?
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