Closed DirkFust closed 1 year ago
Duplicate of #110
@fvanroie Any Idea when this is going to stable? I use this to send the doorbell image to my plates to see who is at the door :-)
Pre-release version 0.7.1 will become "Stable" when the firmware version 0.7.0 is released. For that to happen, the docs need to be updated and some (minor) issue fixed... There is no timeline, so I don't know yet.
Perform all steps below and tick them with [x]
Describe the bug
The Home Assitant service
openhasp.push_image
failed with an error. This seems to be caused by the new pillow version in HomeAssistant 2023.8.0 (pillow 10.0.0
instead ofpillow 9.5.0
in 2023.7.0)To Reproduce
Create an automation in HomeAssistant and copy and paste this code in yaml mode,
obj
andentitiy_id
have to be adapted to the local plate. Then run this automation manuallyExpected behavior
The image should be scaled and shown
Possible solution
In file
image.py
change line 35 fromim.thumbnail((height, width), Image.ANTIALIAS)
toim.thumbnail((height, width), Image.Resampling.LANCZOS)
Other values are possible (BILINEAR, BICUBIC, ...) but as far as I understood, the old ANTIALIAS used LANCZOS. Other filters produce worse quality but have better performance. But since I assume that only a few images are scaled at a time and displyed on the small screen and those likely are (hopefully) not that large to begin with, LANCZOS should be fine...
Screenshots or video