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 GitHub
parent f837da6fe3
commit 1ed8e41e90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

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