mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-05 14:47:40 +03:00
Fix quality=0 handling
Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
This commit is contained in:
parent
3a7766ddbd
commit
0ad8fff9f9
@ -272,7 +272,7 @@ def draw_box_with_label(
|
||||
|
||||
def get_image_quality_params(ext: str, quality: Optional[int]) -> list[int]:
|
||||
if ext in ("jpg", "jpeg"):
|
||||
return [int(cv2.IMWRITE_JPEG_QUALITY), quality or 70]
|
||||
return [int(cv2.IMWRITE_JPEG_QUALITY), quality if quality is not None else 70]
|
||||
|
||||
if ext == "webp":
|
||||
return [int(cv2.IMWRITE_WEBP_QUALITY), quality or 60]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user