Aspect ratio for vertical images fixed

master
José Carlos Cuevas 4 years ago
parent 10aabd57d9
commit 00a181ad76

@ -41,7 +41,7 @@ def initialize():
printer_endpoint = config.get("PRINTER_ENDPOINT") or 0x01
# return Usb(prid1, prid2, printer_interface, printer_endpoint)
return File("/dev/usb/lp0")
return File("/dev/usb/lp2")
def reset_defaults(printer):
@ -199,7 +199,7 @@ def print_image(printer, image):
im = im.transpose(Image.ROTATE_90)
else:
height = math.floor(384.0 * ratio)
height = math.floor(384.0 / ratio)
im = im.resize((384, height))
im.save("temp.png")

Loading…
Cancel
Save