Re: Converting a CFImageRef to a NSImage
Re: Converting a CFImageRef to a NSImage
- Subject: Re: Converting a CFImageRef to a NSImage
- From: Nick Zitzmann <email@hidden>
- Date: Thu, 5 Jun 2008 18:15:09 -0600
On Jun 5, 2008, at 6:12 PM, Felipe Monteiro de Carvalho wrote:
I would love to, but this method was added in 10.5
I am using 10.4
You can still do this in 10.4, just not with NSBitmapImageRep. Create
an NSImage, call -lockFocus on it to create a CGContextRef, call
[[NSGraphicsContext currentContext] graphicsPort] to get the context
_after_ locking focus, draw the image, then call -unlockFocus. That
ought to work.
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
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