Skip to content

Commit

Permalink
add api route with 'shrink' argument
Browse files Browse the repository at this point in the history
(provides URL for downsampled images)
  • Loading branch information
denniswittich committed Aug 3, 2023
1 parent a0703fb commit 60da303
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions rosys/vision/image_route.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def create_image_route(camera_provider: 'CameraProvider') -> None:
async def get_image(camera_id: str, timestamp: str, shrink: int = 1) -> Response:
return await _get_image(camera_provider.cameras, camera_id, timestamp, shrink)
app.add_api_route('/' + camera_provider.base_path + '/{camera_id}/{timestamp}', get_image)
app.add_api_route('/' + camera_provider.base_path + '/{camera_id}/{timestamp}/{shrink}', get_image)
app.add_api_route('/' + camera_provider.base_path + '/placeholder', _get_placeholder)


Expand Down

0 comments on commit 60da303

Please sign in to comment.