Re: NSImage
Re: NSImage
- Subject: Re: NSImage
- From: Mike Abdullah <email@hidden>
- Date: Fri, 1 Jan 2010 18:08:05 +0000
On 31 Dec 2009, at 22:26, 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?
Strictly speaking, the quickest way to generate an NSImage object would be to create an NSImageRep that knows how to draw your array of color data. Then, create an NSImage with that. The ways to do that:
A) Can you directly init an NSBitmapImageRep from the data? If so, use that
B) Create a NSCustomImageRep object and have the existing holder of the image data implement the drawing methods.
C) Create your own NSImageRep subclass._______________________________________________
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