Re: NSImage
Re: NSImage
- Subject: Re: NSImage
- From: Uli Kusterer <email@hidden>
- Date: Fri, 1 Jan 2010 22:47:03 +0100
David,
I think you may want to read Henry's answer again. The path going through NSBitmapImageRep and NSImage that he recommends doesn't involve any CGBitmapContexts or CGImageRefs. Well, at least not in any code you write :-)
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.masters-of-the-void.com
On 01.01.2010, at 00:21, David Blanton wrote:
> Yeah, I was doing it with CGBitmapContextCreate followed by CGBitmapContextCreateImage but that ends up as a CGImageRef.
>
> I want NSImage so I can put an NSImageCell in an NSOutlineView and walk away !
>
>
> Happy New Year !
>
> I have 15 year old scotch to crack with a 28 year Apple Employee this evening !
>
>
> On Dec 31, 2009, at 3:54 PM, Henry McGilton (Boulevardier) wrote:
>
>>
>> On Dec 31, 2009, at 2:26 PM, David Blanton wrote:
>>
>>> Given an array of color data (a generic bitmap) what is the best / fastest / recommended method to convert this to an NSImage?
>>
>> Load your data into memory, create an NSBitmapImageRep from that pile of
>> data, then make an NSImage from the NSBitmapImageRep . . .
>>
>> Cheers,
>> . . . . . . . . Henry
>>
>>
>>
>> =================================================
>> iPhone App Development and Developer Education . . .
>> Visit www.nonatomic-retain.com
>>
>> Mac OSX Application Development, Plus a Great Deal More . . .
>> Visit www.trilithon.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