Re: NSImage
Re: NSImage
- Subject: Re: NSImage
- From: David Blanton <email@hidden>
- Date: Fri, 1 Jan 2010 12:15:32 -0700
Thanks. Food for thought.
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.
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:
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
References: | |
| >Re: NSImage (From: Mike Abdullah <email@hidden>) |