Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion homeassistant/components/camera/proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ def _resize_image(image, opts):
quality = opts.quality or DEFAULT_QUALITY
new_width = opts.max_width

img = Image.open(io.BytesIO(image))
try:
img = Image.open(io.BytesIO(image))
except IOError:
return image
imgfmt = str(img.format)
if imgfmt not in ('PNG', 'JPEG'):
_LOGGER.debug("Image is of unsupported type: %s", imgfmt)
Expand Down