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:
2022-07-28 11:06:55 +02:00
parent 3b59eb8827
commit e0246d19ec
3 changed files with 2 additions and 3 deletions

View File

@@ -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();

View File

@@ -576,7 +576,6 @@ public class SecondApplet extends PApplet {
}
}
startRobot = false;
println(renderFrameRate);
if (renderFrameRate > 5) {
renderSize+=2;
} else {

View File

@@ -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);