Browse Source

fixed a bug where the source image would fall back to cat instead of the last image loaded after disabling webcam mode

master
Victor Giers 2 years ago
parent
commit
e0246d19ec
3 changed files with 2 additions and 3 deletions
  1. 1
    1
      manglr2.pde
  2. 0
    1
      secondapplet.pde
  3. 1
    1
      source.pde

+ 1
- 1
manglr2.pde 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();

+ 0
- 1
secondapplet.pde View File

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

+ 1
- 1
source.pde 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);

Loading…
Cancel
Save