Skip to content

Commit

Permalink
size image to window
Browse files Browse the repository at this point in the history
The default camera might not be sized at 640x480 and so a partial image will be shown in most cases (which I found has confused some users).  This fixes that issue though the image might also be skewed.  I'm not sure the best way to handle this whether in `draw()` or in `setup()`
  • Loading branch information
shiffman committed Jul 30, 2015
1 parent 30fb795 commit ae0bdfe
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void draw() {
if (cam.available() == true) {
cam.read();
}
image(cam, 0, 0);
image(cam, 0, 0, width, height);
// The following does the same as the above image() line, but
// is faster when just drawing the image without any additional
// resizing, transformations, or tint.
Expand Down

0 comments on commit ae0bdfe

Please sign in to comment.