fix: horizontal/vertical density settings were backwards for bitImageRaster

This commit is contained in:
Michael Billington 2016-04-13 22:19:50 +10:00
parent a0d8689141
commit f903af6730
1 changed files with 1 additions and 1 deletions

View File

@ -59,7 +59,7 @@ class Escpos(object):
if impl == "bitImageRaster": if impl == "bitImageRaster":
# GS v 0, raster format bit image # 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) 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()) self._raw(header + im.to_raster_format())