aboutsummaryrefslogtreecommitdiff
path: root/lpg/libqr/bitmap.c
diff options
context:
space:
mode:
authorLeo Uino <leo@norisys.jp>2011-08-06 11:13:19 +0900
committerLeo Uino <leo@norisys.jp>2011-08-06 11:13:19 +0900
commit5d4815f09b8c0caf4e152bf737036eef22aaa399 (patch)
tree93dd8869226d3fe716abd85b959fa714cf6db571 /lpg/libqr/bitmap.c
parenteaec8202df88999e3d2fbc2755113dc03172e021 (diff)
downloadpdf-simple-sign-5d4815f09b8c0caf4e152bf737036eef22aaa399.tar.gz
pdf-simple-sign-5d4815f09b8c0caf4e152bf737036eef22aaa399.tar.xz
pdf-simple-sign-5d4815f09b8c0caf4e152bf737036eef22aaa399.zip
Further bitmap fixes
Diffstat (limited to 'lpg/libqr/bitmap.c')
-rw-r--r--lpg/libqr/bitmap.c8
1 files changed, 5 insertions, 3 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) {