diff options
author | Leo Uino <leo@norisys.jp> | 2011-07-14 11:06:47 +0900 |
---|---|---|
committer | Leo Uino <leo@norisys.jp> | 2011-07-14 11:06:47 +0900 |
commit | 35baea42d794bec1fd5f2200f1f6f48877c5c26c (patch) | |
tree | 835460220763ca90bd17ed2c91999ebd28731ca7 /lpg/libqr/bitmap.c | |
parent | 44fc0ba93934ea9915fcd4f1902f49de57f2a949 (diff) | |
download | pdf-simple-sign-35baea42d794bec1fd5f2200f1f6f48877c5c26c.tar.gz pdf-simple-sign-35baea42d794bec1fd5f2200f1f6f48877c5c26c.tar.xz pdf-simple-sign-35baea42d794bec1fd5f2200f1f6f48877c5c26c.zip |
First attempt at parsing
Diffstat (limited to 'lpg/libqr/bitmap.c')
-rw-r--r-- | lpg/libqr/bitmap.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lpg/libqr/bitmap.c b/lpg/libqr/bitmap.c index 3394784..759aeca 100644 --- a/lpg/libqr/bitmap.c +++ b/lpg/libqr/bitmap.c @@ -49,6 +49,16 @@ void qr_bitmap_destroy(struct qr_bitmap * bmp) } } +int qr_bitmap_add_mask(struct qr_bitmap * bmp) +{ + size_t size = bmp->stride * bmp->width; + bmp->mask = malloc(size); + if (!bmp->mask) + return -1; + memset(bmp->mask, 0xFF, size); + return 0; +} + struct qr_bitmap * qr_bitmap_clone(const struct qr_bitmap * src) { struct qr_bitmap * bmp; |