17 #define VERSION "1.0.0" 
   18 #define BUILD_DATE __DATE__ 
   20 #define MAX_SYMBOL_NUMBER       61 
   21 #define MAX_COLOR_NUMBER        256 
   22 #define MAX_SIZE_ENCODING_MODE  256 
   23 #define JAB_ENCODING_MODES      6 
   24 #define ENC_MAX                 1000000 
   25 #define NUMBER_OF_MASK_PATTERNS 8 
   27 #define DEFAULT_SYMBOL_NUMBER                   1 
   28 #define DEFAULT_MODULE_SIZE                             12 
   29 #define DEFAULT_COLOR_NUMBER                    8 
   30 #define DEFAULT_MODULE_COLOR_MODE               2 
   31 #define DEFAULT_ECC_LEVEL                               3 
   32 #define DEFAULT_MASKING_REFERENCE               7 
   35 #define DISTANCE_TO_BORDER                  4 
   36 #define MINIMUM_DISTANCE_BETWEEN_ALIGNMENTS 16 
   38 #define BITMAP_BITS_PER_PIXEL   32 
   39 #define BITMAP_BITS_PER_CHANNEL 8 
   40 #define BITMAP_CHANNEL_COUNT    4 
   45 #define NORMAL_DECODE           0 
   46 #define COMPATIBLE_DECODE       1 
   48 #define VERSION2SIZE(x)         (x * 4 + 17) 
   49 #define SIZE2VERSION(x)         ((x - 17) / 4) 
   50 #define MAX(a,b)                        ({__typeof__ (a) _a = (a); __typeof__ (b) _b = (b); _a > _b ? _a : _b;}) 
   51 #define MIN(a,b)                        ({__typeof__ (a) _a = (a); __typeof__ (b) _b = (b); _a < _b ? _a : _b;}) 
   53 #define JAB_REPORT_ERROR(x)     { printf("JABCode Error: "); printf x; printf("\n"); } 
   54 #define JAB_REPORT_INFO(x)      { printf("JABCode Info: "); printf x; printf("\n"); } 
   56 typedef unsigned char           jab_byte;
 
   57 typedef char                            jab_char;
 
   58 typedef unsigned char           jab_boolean;
 
   59 typedef int                             jab_int32;
 
   60 typedef unsigned int            jab_uint32;
 
   61 typedef short                           jab_int16;
 
   62 typedef unsigned short          jab_uint16;
 
   63 typedef long long                       jab_int64;
 
   64 typedef unsigned long long      jab_uint64;
 
   65 typedef float                           jab_float;
 
   66 typedef double              jab_double;
 
   98    jab_int32    bits_per_pixel;
 
   99    jab_int32    bits_per_channel;
 
  100    jab_int32    channel_count;
 
  123         jab_int32               color_number;
 
  124         jab_int32               symbol_number;
 
  125         jab_int32               module_size;
 
  126         jab_int32               master_symbol_width;
 
  127         jab_int32               master_symbol_height;
 
  130         jab_byte*               symbol_ecc_levels;
 
  131         jab_int32*              symbol_positions;
 
  142         jab_byte docked_position;
 
  153         jab_int32 host_index;
 
  154         jab_int32 host_position;
 
  156         jab_float module_size;
 
Decoded symbol. 
Definition: jabcode.h:151
2-dimensional float vector 
Definition: jabcode.h:79
jab_data * decodeJABCode(jab_bitmap *bitmap, jab_int32 mode, jab_int32 *status)
Decode a JAB Code. 
Definition: detector.c:3074
Code bitmap. 
Definition: jabcode.h:95
void destroyEncode(jab_encode *enc)
Destroy encode object. 
Definition: encoder.c:249
jab_encode * createEncode(jab_int32 color_number, jab_int32 symbol_number)
Create encode object. 
Definition: encoder.c:177
jab_boolean saveImage(jab_bitmap *bitmap, jab_char *filename)
Save code bitmap as png image. 
Definition: image.c:26
jab_int32 generateJABCode(jab_encode *enc, jab_data *data)
Generate JABCode. 
Definition: encoder.c:2215
Data structure. 
Definition: jabcode.h:87
jab_byte * palette
Palette holding used module colors in format RGB. 
Definition: jabcode.h:128
2-dimensional integer vector 
Definition: jabcode.h:71
jab_symbol * symbols
Pointer to internal representation of JAB Code symbols. 
Definition: jabcode.h:132
Symbol parameters. 
Definition: jabcode.h:107
Encode parameters. 
Definition: jabcode.h:122
void reportError(jab_char *message)
Report error message. 
Definition: encoder.c:2352
jab_data * decodeJABCodeEx(jab_bitmap *bitmap, jab_int32 mode, jab_int32 *status, jab_decoded_symbol *symbols, jab_int32 max_symbol_number)
Extended function to decode a JAB Code. 
Definition: detector.c:2926
jab_bitmap * readImage(jab_char *filename)
Read image into code bitmap. 
Definition: image.c:64