Skip to content

0.47.0

Compare
Choose a tag to compare
@github-actions github-actions released this 19 Nov 19:44
· 53 commits to main since this release

This release allows you to manage Camera in your own context . You can now safely do:

with Camera(device) as camera:
    frame1 = camera.snapshot()
    frame2 = camera.snapshot()
    # ... do something cool with frames ...

This change also fixes the behavior of snapshot returning the same frame when passing Camera a video file.

To maintain resource safety by default, we still support:

camera = Camera(device)

# will safely open / close camera
frame1 = camera.snapshot()

# will safely open / close camera
frame2 = camera.snapshot()

# ... do something cool with frames ...

Breaking change: We have dropped the dropframes flag to snapshot. We recommend using the new context approach and manually taking a few snapshots, if needed.