site_archiver@lists.apple.com Delivered-To: cocoa-dev@lists.apple.com Thanks. Food for thought. Any comments on performance, please. db On Jan 1, 2010, at 11:08 AM, Mike Abdullah wrote: On 31 Dec 2009, at 22:26, David Blanton wrote: C) Create your own NSImageRep subclass. _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/site_archiver%40lists.apple... I will be dealing with converting these bitmaps as the user does mouse stuff in a view, like dragging it around or grabbing sizing handles. I will be sending the move data to our underlying portable code, that code renders a new bitmap and hands it to me for display. 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. This email sent to site_archiver@lists.apple.com