openframeworks/openFrameworks — pull request #1912 by kylemcdonald (2013-03-04 09:32:09+00:00)
Title: added ofPixels::setColor(ofColor) and ofImage::setColor(ofColor)

example:

````c++
#include "ofAppGlutWindow.h"
#include "ofMain.h"

class ofApp : public ofBaseApp {
public:
ofImage img;

void setup() {
img.allocate(ofGetWidth(), ofGetHeight(), OF_IMAGE_COLOR);
img.update();
}

void update() {
img.setColor(ofColor::fromHsb(mouseX % 256, mouseY % 256, 255));
img.update();
}

void draw() {
img.draw(0, 0);
}
};

int main() {
ofAppGlutWindow window;
ofSetupOpenGL(&window, 1280, 720, OF_WINDOW);
ofRunApp(new ofApp());
}
````