diff options
| author | Comment <tim@gray.(none)> | 2014-03-15 12:28:02 +0000 |
|---|---|---|
| committer | Comment <tim@gray.(none)> | 2014-03-15 12:28:02 +0000 |
| commit | 932596c1d7d260f335a2f88ff813f1dbfa3449a3 (patch) | |
| tree | a3731ca8ade32e82ce600515e411b554ee9234fc /offsetProject/src/ofApp.cpp | |
| parent | d1abb8fcf4784aa1a7b778abf6e237d71d1da7c7 (diff) | |
display snap
Diffstat (limited to 'offsetProject/src/ofApp.cpp')
| -rw-r--r-- | offsetProject/src/ofApp.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/offsetProject/src/ofApp.cpp b/offsetProject/src/ofApp.cpp index 54e6776..bd3fd92 100644 --- a/offsetProject/src/ofApp.cpp +++ b/offsetProject/src/ofApp.cpp @@ -79,11 +79,11 @@ void ofApp::update() { } if (button.action()) { - ofImage snap; - snap.setUseTexture(false); snap.setFromPixels(kinect.getPixels(),kinect.width, kinect.height, OF_IMAGE_COLOR); + snap.crop(80, 0, 480,480); snap.saveImage("saved/"+ofGetTimestampString()+".png"); - cout<<"SNAP!"<<endl; //save image now + ///cout<<"SNAP!"<<endl; //save image now + frozentime=ofGetElapsedTimef(); } store.update(); @@ -195,7 +195,7 @@ void ofApp::draw() { screenleft.draw(0,0,(ofGetWidth()-ofGetHeight())/2,ofGetHeight()); screenright.draw(ofGetWidth()-((ofGetWidth()-ofGetHeight())/2),0,(ofGetWidth()-ofGetHeight())/2,ofGetHeight()); store.drawinstagram(ofGetWidth()-(((ofGetWidth()-ofGetHeight())/2)*0.8f),ofGetHeight()*0.44f,ofGetHeight()*0.24f,ofGetHeight()*0.24f); - + if (snap.isAllocated()) snap.draw(ofGetHeight()*0.074f,ofGetHeight()*0.44f,ofGetHeight()*0.24f,ofGetHeight()*0.24f); int fw,w,xstart,ystart,kinexstart; |
