• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSImage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: NSImage
      • From: David Blanton <email@hidden>
  • Prev by Date: Re: Achieve the Blur background as in Dock menus.
  • Next by Date: Re: Using performSelector:withObject:afterDelay: to call a delegate method?
  • Previous by thread: Re: Achieve the Blur background as in Dock menus.
  • Next by thread: Re: NSImage
  • Index(es):
    • Date
    • Thread