• 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: From c array to NSImage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: From c array to NSImage


  • Subject: Re: From c array to NSImage
  • From: "Hamish Allan" <email@hidden>
  • Date: Wed, 11 Jun 2008 22:00:20 +0100

On Wed, Jun 11, 2008 at 9:50 PM, Bill Prinzmetal <email@hidden> wrote:

> I would like to create an NSImage starting from a c array.  I have a c
> array, e.g.,
>
> float myArray[256][256];
>
> Where the values go from 0.0 (will be black) to 1.0 (will be white)
> I would like to may a gray level image [NSImage] from this array.  I have no
> idea of how to begin.

You could perhaps Google "NSImage", click on the second result, "Cocoa
Drawing Guide: Creating NSImage Objects", and look at the section
"Creating a Bitmap"...

Hamish
_______________________________________________

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: From c array to NSImage
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Re: -insertNewline: and -insertLineBreak:, using the shift key modifier
  • Next by Date: Re: NSTask(syslog)->NSPipe->NSFileHandle->readInBackgroundAndNotify buffers
  • Previous by thread: From c array to NSImage
  • Next by thread: Re: From c array to NSImage
  • Index(es):
    • Date
    • Thread