Skip to content

Instantly share code, notes, and snippets.

@Akira-Hayasaka
Created January 17, 2014 05:57
Show Gist options
  • Save Akira-Hayasaka/8469033 to your computer and use it in GitHub Desktop.
Save Akira-Hayasaka/8469033 to your computer and use it in GitHub Desktop.
zmppublish
void testApp::setup()
{
ofSetWindowPosition(0, 0);
sender_dist.setHighWaterMark(2);
sender_dist.bind(string("tcp://*:") + ofToString(9999));
int fishType = 3;
int deviceID = 5;
testTex.loadImage("imgs/testTex.jpg");
testTex.setImageType(OF_IMAGE_COLOR);
testTex.setColor(0, 0, ofColor(255 - fishType, 255 - deviceID, 255));
}
void testApp::keyPressed(int key)
{
if (key == 's')
{
ofBuffer imgbuf;
ofSaveImage(testTex.getPixelsRef(), imgbuf);
sender_dist.send(imgbuf);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment