refactor: Disable image resizing before dithering

This commit is contained in:
2025-12-09 21:13:19 -07:00
committed by Tanner Collin (aider)
parent a8132f9653
commit 56574b4c14

View File

@@ -30,10 +30,10 @@ def print_picture(filename, p):
img = Image.open(io.BytesIO(response.content))
# Resize first
wpercent = (PRINTER_WIDTH / float(img.size[0]))
hsize = int((float(img.size[1]) * float(wpercent)))
img = img.resize((PRINTER_WIDTH, hsize), Image.LANCZOS)
## Resize first
#wpercent = (PRINTER_WIDTH / float(img.size[0]))
#hsize = int((float(img.size[1]) * float(wpercent)))
#img = img.resize((PRINTER_WIDTH, hsize), Image.LANCZOS)
# Convert with dithering
img = img.convert('1', dither=Image.FLOYDSTEINBERG)