fixed a bug where the source image would fall back to cat instead of the last image loaded after disabling webcam mode
This commit is contained in:
@@ -61,7 +61,7 @@ void setup() {
|
||||
}
|
||||
fallbackImage = loadImage(dataPath("0.png"));
|
||||
bin = loadImage(dataPath("bin.png"));
|
||||
cam = new Capture(this, 800, 600);
|
||||
cam = new Capture(this, 1280, 768);
|
||||
|
||||
String[] args = {"SecondFrame"};
|
||||
gui = new SecondApplet();
|
||||
|
||||
@@ -576,7 +576,6 @@ public class SecondApplet extends PApplet {
|
||||
}
|
||||
}
|
||||
startRobot = false;
|
||||
println(renderFrameRate);
|
||||
if (renderFrameRate > 5) {
|
||||
renderSize+=2;
|
||||
} else {
|
||||
|
||||
@@ -38,7 +38,7 @@ class SourceManager { //no constructor
|
||||
void setImage(PImage img) { //set image to source
|
||||
imageChanged = true;
|
||||
source = img.get();
|
||||
//fallbackImage = source;
|
||||
if(!webcamMode)fallbackImage = source;
|
||||
nativeResoX = source.width;
|
||||
nativeResoY = source.height;
|
||||
//println(nativeResoX);
|
||||
|
||||
Reference in New Issue
Block a user