• 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: Creating and Displaying an Image
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Creating and Displaying an Image


  • Subject: Re: Creating and Displaying an Image
  • From: Brian Webster <email@hidden>
  • Date: Mon, 30 Jul 2001 00:31:46 -0500

Hi all,

I am trying to write a program that can create an image by simply
plotting pixel by pixel on my screen (or off-screen) and then being able
to display it on screen. I would ultimately like to see something like:

[Object setPixelx:20 y:30 color:blue];
[Object Display];

I had a look at NSImage but it seems that this class is for displaying
images that are already created and is not really used for drawing pixels
to a graphics port.

If you're looking to manipulate images at the pixel level, you'll probably want to look at NSBitmapImageRep. You can create one, access its bitmap data, and write to the data, and then use the draw, drawAtPoint:, or drawInRect: methods (inherited from NSImageRep) to display it in a view onscreen.

--
Brian Webster
email@hidden
http://www.owlnet.rice.edu/~bwebster


  • Prev by Date: Re: Can one extend CoreFoundation using Obj-C?
  • Next by Date: Re: Creating and Displaying an Image
  • Previous by thread: Re: Creating and Displaying an Image
  • Next by thread: NSMovieView and QT callbacks
  • Index(es):
    • Date
    • Thread