From f903af6730a6891e75e1833ede61b2ef976085a4 Mon Sep 17 00:00:00 2001 From: Michael Billington Date: Wed, 13 Apr 2016 22:19:50 +1000 Subject: [PATCH] fix: horizontal/vertical density settings were backwards for bitImageRaster --- escpos/escpos.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/escpos/escpos.py b/escpos/escpos.py index 639de99..b9dcdf8 100644 --- a/escpos/escpos.py +++ b/escpos/escpos.py @@ -59,7 +59,7 @@ class Escpos(object): if impl == "bitImageRaster": # GS v 0, raster format bit image - density_byte = (0 if high_density_vertical else 1) + (0 if high_density_horizontal else 2) + density_byte = (0 if high_density_horizontal else 1) + (0 if high_density_vertical else 2) header = GS + b"v0" + six.int2byte(density_byte) + self._int_low_high(im.width_bytes, 2) + self._int_low_high(im.height, 2) self._raw(header + im.to_raster_format())