diff options
author | Leo Uino <leo@norisys.jp> | 2011-08-06 11:13:19 +0900 |
---|---|---|
committer | Leo Uino <leo@norisys.jp> | 2011-08-06 11:13:19 +0900 |
commit | 5d4815f09b8c0caf4e152bf737036eef22aaa399 (patch) | |
tree | 93dd8869226d3fe716abd85b959fa714cf6db571 /lpg/libqr | |
parent | eaec8202df88999e3d2fbc2755113dc03172e021 (diff) | |
download | pdf-simple-sign-5d4815f09b8c0caf4e152bf737036eef22aaa399.tar.gz pdf-simple-sign-5d4815f09b8c0caf4e152bf737036eef22aaa399.tar.xz pdf-simple-sign-5d4815f09b8c0caf4e152bf737036eef22aaa399.zip |
Further bitmap fixes
Diffstat (limited to 'lpg/libqr')
-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); |