Skip to content

Commit

Permalink
adjust preview window size
Browse files Browse the repository at this point in the history
  • Loading branch information
maxmousee committed Nov 20, 2021
1 parent c371599 commit 98b814a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions snap-on-btn-press.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,20 @@ def setup_camera(the_camera):
the_camera.hflip = False
the_camera.vflip = False
the_camera.crop = (0.0, 0.0, 1.0, 1.0)
the_camera.resolution = (640, 480)
the_camera.resolution = (362, 272)
the_camera.image_denoise = False
the_camera.exif_tags['IFD0.Copyright'] = 'Copyright (c) 2020 NFS Industries'
the_camera.exif_tags['IFD0.Model'] = 'NatanCam Model 1'
# you may need to increase gpu_mem in /boot/config.txt to achieve full resolution with the Camera Module v2.


def start_preview(the_camera):
the_camera.resolution = (500, 280)
the_camera.resolution = (362, 272)
# Set up the preview. Here we're using the return value of start_preview
# but you can specify these values as arguments to start_preview too
preview = the_camera.start_preview()
preview.fullscreen = False
preview.window = (0, 180, 500, 280)
preview.window = (0, 180, 362, 272)
preview.alpha = 255


Expand Down

0 comments on commit 98b814a

Please sign in to comment.