per pixel image manipulation (for iphone)

Posts: 1
Joined: 2009.07
Post: #1
hi, i'm somewhat new to objective-c and mac programming- i've worked mostly with flash in the past, and have some questions. Basically, I want to be able to set the color of each pixel in an image manually, and was wondering if it's possible with objc. if anyones familiar with actionscript, it'd look something like this in AS3:

var image:BitmapData=new BitmapData(500,500);
var imagebm:Bitmap=new Bitmap(image);
(this would yield a box, with a black to red gradient going diagonally. this is just an example btw, what i actually want drawn is more complicated than this sort of gradient)

if anyone knows how to go about doing this and can point me in the right direction, i'd really appreciate it, thanks!
Quote this message in a reply
Posts: 1,403
Joined: 2005.07
Post: #2
Do you mean an NSImage, OpenGL or something else?

If you use Cocoa, then you can create an NSImage from an NSBitmapImageRep, the NSBitmapImageRep is similar to your AS code.

Sir, e^iπ + 1 = 0, hence God exists; reply!
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  [CoreGraphics] Image manipulation - pixel by pixel g00se 5 13,337 Jul 28, 2010 08:27 AM
Last Post: ThemsAllTook