Skip to content

Commit

Permalink
Merge branch 'main' of github.com:dgomes/hasp-lvgl-custom-component
Browse files Browse the repository at this point in the history
  • Loading branch information
dgomes committed May 13, 2024
2 parents d36d97d + 10833d3 commit 246fb06
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/openhasp/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ def image_to_rgb565(in_image, size, fitscreen):
if not fitscreen:
width = min(w for w in [width, original_width] if w is not None and w > 0)
height = min(h for h in [height, original_height] if h is not None and h > 0)
im.thumbnail((height, width), Image.LANCZOS)
im.thumbnail((width, height), Image.LANCZOS)
else:
im = im.resize((height, width), Image.LANCZOS)
im = im.resize((width, height), Image.LANCZOS)
width, height = im.size # actual size after resize

out_image = tempfile.NamedTemporaryFile(mode="w+b")
Expand Down

0 comments on commit 246fb06

Please sign in to comment.