From 5d4815f09b8c0caf4e152bf737036eef22aaa399 Mon Sep 17 00:00:00 2001 From: Leo Uino Date: Sat, 6 Aug 2011 11:13:19 +0900 Subject: Further bitmap fixes --- lpg/libqr/bitmap.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lpg/libqr/bitmap.c') diff --git a/lpg/libqr/bitmap.c b/lpg/libqr/bitmap.c index 1c4e38b..246b9bd 100644 --- a/lpg/libqr/bitmap.c +++ b/lpg/libqr/bitmap.c @@ -167,7 +167,7 @@ static void render_line_2(unsigned char * out, void qr_bitmap_render(const struct qr_bitmap * bmp, void * buffer, int mod_bits, - ptrdiff_t line_stride, + long line_stride, int line_repeat, unsigned long mark, unsigned long space) @@ -185,8 +185,10 @@ void qr_bitmap_render(const struct qr_bitmap * bmp, out = buffer; dim = bmp->width; - mark &= (1 << mod_bits) - 1; - space &= (1 << mod_bits) - 1; + if (pack) { + mark &= (1 << mod_bits) - 1; + space &= (1 << mod_bits) - 1; + } n = dim; while (n-- > 0) { -- cgit v1.2.3-70-g09d2