1 /*
2 This file was generated by the following command:
3 
4 cfunctions qrpng.c
5 
6 */
7 #ifndef CFH_QRPNG_H
8 #define CFH_QRPNG_H
9 
10 #line 9 "qrpng.c"
11 typedef struct qrpng {
12     /* Size of a module in pixels. */
13     unsigned int scale;
14     /* Size of the quietzone in modules. */
15     unsigned int quietzone;
16     char * filename;
17     /* PNG stuff. */
18     png_structp png;
19     png_infop info;
20     png_byte ** row_pointers;
21     /* Number of blocks in the image part (not including the quiet zone). */
22     int size;
23     /* Actual size of the PNG image. The image is always square, so
24        the width is equal to the height. */
25     unsigned int img_size;
26     png_byte * quiet;
27 }
28 qrpng_t;
29 typedef enum qrpng_status {
30     qrpng_ok,
31     qrpng_bad_scale,
32     qrpng_bad_quietzone,
33     qrpng_bad_filename,
34     qrpng_bounds,
35 }
36 qrpng_status_t;
37 #define QUIETZONE 4
38 #define MAX_SCALE 100
39 #define MAX_QUIETZONE 100
40 #define QRPNG_DEFAULT_QUIET QUIETZONE
41 #define QRPNG_MINIMUM_QUIET 0
42 #define QRPNG_MAXIMUM_QUIET 100
43 #define QRPNG_DEFAULT_SCALE 3
44 #define QRPNG_MINIMUM_SCALE 1
45 #define QRPNG_MAXIMUM_SCALE MAX_SCALE
46 
47 #line 34 "qrpng.c"
48 qrpng_status_t qrpng_make_png (qr_t* qr, qrpng_t* qrpng);
49 
50 #line 117 "qrpng.c"
51 qrpng_status_t qrpng_write (qrpng_t* qrpng);
52 
53 #line 136 "qrpng.c"
54 qrpng_status_t qrpng_free (qrpng_t* qrpng);
55 
56 #endif /* CFH_QRPNG_H */
57