Aspect ratio for vertical images fixed
This commit is contained in:
parent
10aabd57d9
commit
00a181ad76
1 changed files with 2 additions and 2 deletions
|
@ -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…
Reference in a new issue