mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
Fix snapshot call (#14448)
This commit is contained in:
parent
3c591ad8a9
commit
2137de37b9
@ -1528,11 +1528,11 @@ def label_snapshot(request: Request, camera_name: str, label: str):
|
|||||||
)
|
)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
event = event_query.get()
|
event: Event = event_query.get()
|
||||||
return event_snapshot(request, event.id)
|
return event_snapshot(request, event.id, MediaEventsSnapshotQueryParams())
|
||||||
except DoesNotExist:
|
except DoesNotExist:
|
||||||
frame = np.zeros((720, 1280, 3), np.uint8)
|
frame = np.zeros((720, 1280, 3), np.uint8)
|
||||||
ret, jpg = cv2.imencode(".jpg", frame, [int(cv2.IMWRITE_JPEG_QUALITY), 70])
|
_, jpg = cv2.imencode(".jpg", frame, [int(cv2.IMWRITE_JPEG_QUALITY), 70])
|
||||||
|
|
||||||
return Response(
|
return Response(
|
||||||
jpg.tobytes,
|
jpg.tobytes,
|
||||||
|
Loading…
Reference in New Issue
Block a user