• 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
2D grayscale image from an array of floats
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

2D grayscale image from an array of floats


  • Subject: 2D grayscale image from an array of floats
  • From: Martin Beroiz <email@hidden>
  • Date: Wed, 16 Dec 2009 12:32:48 -0600

Hello,

I'm new in cocoa, and I want to accomplish something in a program i'm developing.

I have an array of floats, that is basically a matrix, and I want to display it on a view as a 2D grayscale image, with each pixel in a gray tone proportional the value of that float.

So far I have subclassed NSView in preparation for the render of the image. Then I searched through the cocoa documentation, and I think the primitive to draw that I need is NSImage. The problem is that NSImage deals basically with existing files, and I didn't find any class that deals with drawing individual pixels or anything like that on the view.

Can anyone please give me any hint on what would be the best approach to this problem? or may be point me some relevant documentation I might read? I know nothing about bitmap image representation, so any pointer on that would appreciated too.

Thanks,
Martin.

_______________________________________________

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: 2D grayscale image from an array of floats
      • From: Graham Cox <email@hidden>
References: 
 >Question in regards to .ics files (From: "Eric E. Dolecki" <email@hidden>)

  • Prev by Date: NSImage support for Windows ico files in 10.4.x?
  • Next by Date: Re: NSUndoManager auto-grouping?
  • Previous by thread: Question in regards to .ics files
  • Next by thread: Re: 2D grayscale image from an array of floats
  • Index(es):
    • Date
    • Thread