Fix proxy camera conversion with PNG Alpha(RGBA) (#40446)

This commit is contained in:
square99
2020-09-23 00:34:23 +09:00
committed by Franck Nijhof
parent 95e6969912
commit 34c0e0f58d

View File

@@ -77,6 +77,8 @@ def _precheck_image(image, opts):
if imgfmt not in ("PNG", "JPEG"):
_LOGGER.warning("Image is of unsupported type: %s", imgfmt)
raise ValueError()
if not img.mode == "RGB":
img = img.convert("RGB")
return img