diff options
author | Leo Howell <leo@lwh.jp> | 2009-09-27 16:31:03 +0900 |
---|---|---|
committer | Leo Howell <leo@lwh.jp> | 2009-09-27 16:31:03 +0900 |
commit | 559eb9633e1f97d70112f02538ae5e9a0e46f4d5 (patch) | |
tree | 78d3ce4998fc9cf60f55162c16323a415d47a57b /lpg/libqr/qr-bitmap.h | |
parent | 24e968c84075344de2b6b31dc054bfe988eacd04 (diff) | |
download | pdf-simple-sign-559eb9633e1f97d70112f02538ae5e9a0e46f4d5.tar.gz pdf-simple-sign-559eb9633e1f97d70112f02538ae5e9a0e46f4d5.tar.xz pdf-simple-sign-559eb9633e1f97d70112f02538ae5e9a0e46f4d5.zip |
bitmap handling routines
Diffstat (limited to 'lpg/libqr/qr-bitmap.h')
-rw-r--r-- | lpg/libqr/qr-bitmap.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/lpg/libqr/qr-bitmap.h b/lpg/libqr/qr-bitmap.h new file mode 100644 index 0000000..d60049a --- /dev/null +++ b/lpg/libqr/qr-bitmap.h @@ -0,0 +1,29 @@ +#ifndef QR_BITMAP_H +#define QR_BITMAP_H + +struct qr_bitmap { + unsigned char * bits; + unsigned char * mask; + size_t stride; + size_t width, height; +}; + +struct qr_bitmap * qr_bitmap_create(int width, int height, int masked); +void qr_bitmap_destroy(struct qr_bitmap *); + +void qr_bitmap_merge(struct qr_bitmap * dest, const struct qr_bitmap * src); + +void qr_bitmap_render(const struct qr_bitmap * bmp, + void * buffer, + size_t mod_bits, + size_t line_stride, + size_t line_repeat, + unsigned long mark, + unsigned long space); + +int qr_bitmap_write_pbm(const char * path, + const char * comment, + const struct qr_bitmap * bmp); + +#endif + |