Pixels[] equivalent

How would the openframework equivalent of this processing code be?

PImage image;

void setup () {
size (320, 240, P3D);
image = createImage (355,355, RGB);

image.loadPixels ();

void draw () {
image (image, 33 , 33);
image.pixels [44] = color (255,0,0)
image.updatePixels ();

Here’s a minimal example that addresses your question, though I’m not being precise

int w, h;
// allocate some image space
ofImage img;
img.allocate(w, h, OF_IMAGE_COLOR);
img.setColor(ofColor::white); //make the whole image white to begin
img.setColor(10, 10, ofColor::red); // toss a red pixel at 10,10 (x,y)

One important difference is that Processing uses a single dimension array to address pixels whereas OF is 2d. You can convert between the two with some simple math.