fix band printing

This commit is contained in:
Thomas van den Berg 2013-02-27 23:18:49 +01:00
parent 5db192751f
commit 7d4ef744de
1 changed files with 1 additions and 1 deletions

View File

@ -85,7 +85,7 @@ class Escpos:
bandsize = 255
current = 0
while current < im.size[1]:
self.image(im.crop((0, current, width, current + bandsize)))
self.image(im.crop((0, current, width, min(im.size[1], current + bandsize))))
current += bandsize