diff options
Diffstat (limited to 'lpg')
-rw-r--r-- | lpg/libqr/bitmap.c | 8 | ||||
-rw-r--r-- | lpg/libqr/qr/bitmap.h | 2 |
2 files changed, 6 insertions, 4 deletions
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) { diff --git a/lpg/libqr/qr/bitmap.h b/lpg/libqr/qr/bitmap.h index 57b33e0..098d9c3 100644 --- a/lpg/libqr/qr/bitmap.h +++ b/lpg/libqr/qr/bitmap.h @@ -24,7 +24,7 @@ void qr_bitmap_merge(struct qr_bitmap * dest, const struct qr_bitmap * src); 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); |