Main libjabcode header.  
More...
Go to the source code of this file.
|  | 
| #define | VERSION   "1.0.0" | 
|  | 
| #define | BUILD_DATE   __DATE__ | 
|  | 
| #define | MAX_SYMBOL_NUMBER   61 | 
|  | 
| #define | MAX_COLOR_NUMBER   256 | 
|  | 
| #define | MAX_SIZE_ENCODING_MODE   256 | 
|  | 
| #define | JAB_ENCODING_MODES   6 | 
|  | 
| #define | ENC_MAX   1000000 | 
|  | 
| #define | NUMBER_OF_MASK_PATTERNS   8 | 
|  | 
| #define | DEFAULT_SYMBOL_NUMBER   1 | 
|  | 
| #define | DEFAULT_MODULE_SIZE   12 | 
|  | 
| #define | DEFAULT_COLOR_NUMBER   8 | 
|  | 
| #define | DEFAULT_MODULE_COLOR_MODE   2 | 
|  | 
| #define | DEFAULT_ECC_LEVEL   3 | 
|  | 
| #define | DEFAULT_MASKING_REFERENCE   7 | 
|  | 
| #define | DISTANCE_TO_BORDER   4 | 
|  | 
| #define | MINIMUM_DISTANCE_BETWEEN_ALIGNMENTS   16 | 
|  | 
| #define | BITMAP_BITS_PER_PIXEL   32 | 
|  | 
| #define | BITMAP_BITS_PER_CHANNEL   8 | 
|  | 
| #define | BITMAP_CHANNEL_COUNT   4 | 
|  | 
| #define | JAB_SUCCESS   1 | 
|  | 
| #define | JAB_FAILURE   0 | 
|  | 
| #define | NORMAL_DECODE   0 | 
|  | 
| #define | COMPATIBLE_DECODE   1 | 
|  | 
| #define | VERSION2SIZE(x)   (x * 4 + 17) | 
|  | 
| #define | SIZE2VERSION(x)   ((x - 17) / 4) | 
|  | 
| #define | MAX(a, b)   ({__typeof__ (a) _a = (a); __typeof__ (b) _b = (b); _a > _b ? _a : _b;}) | 
|  | 
| #define | MIN(a, b)   ({__typeof__ (a) _a = (a); __typeof__ (b) _b = (b); _a < _b ? _a : _b;}) | 
|  | 
| #define | JAB_REPORT_ERROR(x)   { printf("JABCode Error: "); printf x; printf("\n"); } | 
|  | 
| #define | JAB_REPORT_INFO(x)   { printf("JABCode Info: "); printf x; printf("\n"); } | 
|  | 
|  | 
| typedef unsigned char | jab_byte | 
|  | 
| typedef char | jab_char | 
|  | 
| typedef unsigned char | jab_boolean | 
|  | 
| typedef int | jab_int32 | 
|  | 
| typedef unsigned int | jab_uint32 | 
|  | 
| typedef short | jab_int16 | 
|  | 
| typedef unsigned short | jab_uint16 | 
|  | 
| typedef long long | jab_int64 | 
|  | 
| typedef unsigned long long | jab_uint64 | 
|  | 
| typedef float | jab_float | 
|  | 
| typedef double | jab_double | 
|  | 
Main libjabcode header. 
libjabcode - JABCode Encoding/Decoding Library
Copyright 2016 by Fraunhofer SIT. All rights reserved. See LICENSE file for full terms of use and distribution.
Contact: Huajian Liu liu@s.nosp@m.it.f.nosp@m.raunh.nosp@m.ofer.nosp@m..de Waldemar Berchtold walde.nosp@m.mar..nosp@m.berch.nosp@m.told.nosp@m.@sit..nosp@m.frau.nosp@m.nhofe.nosp@m.r.de 
      
        
          | jab_encode* createEncode | ( | jab_int32 | color_number, | 
        
          |  |  | jab_int32 | symbol_number | 
        
          |  | ) |  |  | 
      
 
Create encode object. 
- Parameters
- 
  
    | color_number | the number of module colors |  | symbol_number | the number of symbols |  
 
- Returns
- the created encode parameter object | NULL: fatal error (out of memory) 
 
 
Decode a JAB Code. 
- Parameters
- 
  
    | bitmap | the image bitmap |  | mode | the decoding mode(NORMAL_DECODE: only output completely decoded data when all symbols are correctly decoded COMPATIBLE_DECODE: also output partly decoded data even if some symbols are not correctly decoded |  | status | the decoding status code (0: not detectable, 1: not decodable, 2: partly decoded with COMPATIBLE_DECODE mode, 3: fully decoded) |  
 
- Returns
- the decoded data | NULL if failed 
 
 
Extended function to decode a JAB Code. 
- Parameters
- 
  
    | bitmap | the image bitmap |  | mode | the decoding mode(NORMAL_DECODE: only output completely decoded data when all symbols are correctly decoded COMPATIBLE_DECODE: also output partly decoded data even if some symbols are not correctly decoded |  | status | the decoding status code (0: not detectable, 1: not decodable, 2: partly decoded with COMPATIBLE_DECODE mode, 3: fully decoded) |  | symbols | the decoded symbols |  | max_symbol_number | the maximal possible number of symbols to be decoded |  
 
- Returns
- the decoded data | NULL if failed 
 
 
Destroy encode object. 
- Parameters
- 
  
  
 
 
Generate JABCode. 
- Parameters
- 
  
    | enc | the encode parameters |  | data | the input data |  
 
- Returns
- 0:success | 1: out of memory | 2:no input data | 3:incorrect symbol version or position | 4: input data too long 
 
 
Read image into code bitmap. 
- Parameters
- 
  
    | filename | the image filename |  
 
- Returns
- Pointer to the code bitmap read from image | NULL 
 
 
      
        
          | void reportError | ( | jab_char * | message | ) |  | 
      
 
Report error message. 
- Parameters
- 
  
  
 
 
      
        
          | jab_boolean saveImage | ( | jab_bitmap * | bitmap, | 
        
          |  |  | jab_char * | filename | 
        
          |  | ) |  |  | 
      
 
Save code bitmap as png image. 
- Parameters
- 
  
    | bitmap | the code bitmap |  | filename | the image filename |  
 
- Returns
- JAB_SUCCESS | JAB_FAILURE