mirror of
https://github.com/home-assistant/core.git
synced 2025-07-11 07:17:12 +00:00
Fix proxy camera conversion with PNG Alpha(RGBA) (#40446)
This commit is contained in:
parent
95e6969912
commit
34c0e0f58d
@ -77,6 +77,8 @@ def _precheck_image(image, opts):
|
|||||||
if imgfmt not in ("PNG", "JPEG"):
|
if imgfmt not in ("PNG", "JPEG"):
|
||||||
_LOGGER.warning("Image is of unsupported type: %s", imgfmt)
|
_LOGGER.warning("Image is of unsupported type: %s", imgfmt)
|
||||||
raise ValueError()
|
raise ValueError()
|
||||||
|
if not img.mode == "RGB":
|
||||||
|
img = img.convert("RGB")
|
||||||
return img
|
return img
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user