1
0
mirror of https://github.com/esphome/esphome.git synced 2024-10-06 10:50:58 +01:00

Fix animation resizing (#4608)

Animation resizing in RGB24 format is causing an error "Image cannot be resized to a bigger size". Other image types do not show the issue, and the only difference is the "image.thumbnail" call.

Removed the call and tested; the animation is shown with the desired size.
This commit is contained in:
guillempages 2023-03-22 09:05:09 +01:00 committed by Jesse Hills
parent 8d3896172d
commit 74fe135c9c
No known key found for this signature in database
GPG Key ID: BEAAE804EFD8E83A

View File

@ -76,8 +76,6 @@ async def to_code(config):
pos = 0
for frameIndex in range(frames):
image.seek(frameIndex)
if CONF_RESIZE in config:
image.thumbnail(config[CONF_RESIZE])
frame = image.convert("RGB")
if CONF_RESIZE in config:
frame = frame.resize([width, height])