From 64c36a74edf9fbb1a273213807496705f20f4570 Mon Sep 17 00:00:00 2001 From: Stephan Sokolow Date: Fri, 15 Aug 2014 20:17:35 -0400 Subject: [PATCH] Allow bandsize to be varied in fullimage() --- escpos/escpos.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/escpos/escpos.py b/escpos/escpos.py index 661baeb..d9a00f9 100644 --- a/escpos/escpos.py +++ b/escpos/escpos.py @@ -53,7 +53,7 @@ class Escpos: buffer = "" cont = 0 - def fullimage(self, img, max_height=860, width=512, histeq=True): + def fullimage(self, img, max_height=860, width=512, histeq=True, bandsize=255): """ Resizes and prints an arbitrarily sized image """ if isinstance(img, Image.Image): im = img.convert("RGB") @@ -85,7 +85,6 @@ class Escpos: im = im.crop((0, 0, im.size[0], max_height)) # Divide into bands - bandsize = 255 current = 0 while current < im.size[1]: self.image(im.crop((0, current, width or im.size[0],