void ParticleTrace :: saveFBO ( ofxFBOTexture& fbo ) { int y = ofGetYear(); int m = ofGetMonth(); int d = ofGetDay(); int r = ofGetHours(); int n = ofGetMinutes(); int s = ofGetSeconds(); char str[255]; sprintf( str, "screengrab_lrg/image_%02d%02d%02d_%02d%02d%02d.png", y % 1000, m, d, r, n, s ); int w = fbo.getWidth(); int h = fbo.getHeight(); ofxCvColorImage imgTemp; imgTemp.allocate( w, h ); imgTemp.setFromPixels( (unsigned char*)fbo.getPixels(), w, h ); imgTemp.mirror( true, false ); ofImage imgSave; imgSave.allocate( w, h, OF_IMAGE_COLOR ); imgSave.setFromPixels( imgTemp.getPixels(), w, h, OF_IMAGE_COLOR ); imgSave.saveImage( str ); imgTemp.clear(); imgSave.clear(); }