Integer is needed, not float
* The size of the image can only be integer, not float. Using round to convert it back
This commit is contained in:
parent
b99c076bae
commit
7da2e32e3c
|
@ -29,9 +29,9 @@ class Escpos:
|
||||||
else:
|
else:
|
||||||
image_border = 32 - (size % 32)
|
image_border = 32 - (size % 32)
|
||||||
if (image_border % 2) == 0:
|
if (image_border % 2) == 0:
|
||||||
return (image_border / 2, image_border / 2)
|
return (round(image_border / 2), round(image_border / 2))
|
||||||
else:
|
else:
|
||||||
return (image_border / 2, (image_border / 2) + 1)
|
return (round(image_border / 2), round((image_border / 2) + 1))
|
||||||
|
|
||||||
|
|
||||||
def _print_image(self, line, size):
|
def _print_image(self, line, size):
|
||||||
|
|
Loading…
Reference in New Issue