dmtx.h   dmtx.h 
skipping to change at line 23 skipping to change at line 23
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Contact: mike@dragonflylogic.com Contact: mike@dragonflylogic.com
*/ */
/* $Id: dmtx.h 770 2009-03-02 22:16:32Z mblaughton $ */ /* $Id: dmtx.h 864 2009-09-03 20:08:29Z mblaughton $ */
/** /**
* @file dmtx.h * @file dmtx.h
* @brief Main libdmtx header * @brief Main libdmtx header
*/ */
#ifndef __DMTX_H__ #ifndef __DMTX_H__
#define __DMTX_H__ #define __DMTX_H__
/* Time headers are required for DmtxTime struct below */ #ifdef __cplusplus
extern "C" {
#endif
/* Time headers required for DmtxTime struct below */
#include <time.h> #include <time.h>
#ifdef HAVE_SYS_TIME_H #ifdef HAVE_SYS_TIME_H
#include <sys/time.h> #include <sys/time.h>
#endif #endif
#ifdef __cplusplus
extern "C" {
#endif
#ifndef M_PI #ifndef M_PI
#define M_PI 3.14159265358979323846 #define M_PI 3.14159265358979323846
#endif #endif
#ifndef M_PI_2 #ifndef M_PI_2
#define M_PI_2 1.57079632679489661923 #define M_PI_2 1.57079632679489661923
#endif #endif
#define DmtxVersion "0.7.0" #define DmtxVersion "0.7.2"
#define DmtxUndefined -1 #define DmtxUndefined -1
#define DmtxPassFail unsigned int
#define DmtxPass 1
#define DmtxFail 0
#define DmtxBoolean unsigned int
#define DmtxTrue 1
#define DmtxFalse 0
#define DmtxFormatMatrix 0
#define DmtxFormatMosaic 1
#define DmtxSymbolSquareCount 24
#define DmtxSymbolRectCount 6
#define DmtxModuleOff 0x00 #define DmtxModuleOff 0x00
#define DmtxModuleOnRed 0x01 #define DmtxModuleOnRed 0x01
#define DmtxModuleOnGreen 0x02 #define DmtxModuleOnGreen 0x02
#define DmtxModuleOnBlue 0x04 #define DmtxModuleOnBlue 0x04
#define DmtxModuleOnRGB 0x07 /* OnRed | OnGreen | OnBlue */ #define DmtxModuleOnRGB 0x07 /* OnRed | OnGreen | OnBlue */
#define DmtxModuleOn 0x07 #define DmtxModuleOn 0x07
#define DmtxModuleUnsure 0x08 #define DmtxModuleUnsure 0x08
#define DmtxModuleAssigned 0x10 #define DmtxModuleAssigned 0x10
#define DmtxModuleVisited 0x20 #define DmtxModuleVisited 0x20
#define DmtxModuleData 0x40 #define DmtxModuleData 0x40
#define DmtxFormatMatrix 0
#define DmtxFormatMosaic 1
#define DmtxSymbolSquareCount 24
#define DmtxSymbolRectCount 6
#define DmtxPassFail unsigned int
#define DmtxPass 1
#define DmtxFail 0
#define DmtxBoolean unsigned int
#define DmtxTrue 1
#define DmtxFalse 0
typedef enum { typedef enum {
DmtxDirNone = 0x00, DmtxSchemeAutoFast = -2,
DmtxDirUp = 0x01 << 0, DmtxSchemeAutoBest = -1,
DmtxDirLeft = 0x01 << 1, DmtxSchemeAscii = 0,
DmtxDirDown = 0x01 << 2, DmtxSchemeC40,
DmtxDirRight = 0x01 << 3, DmtxSchemeText,
DmtxDirHorizontal = DmtxDirLeft | DmtxDirRight, DmtxSchemeX12,
DmtxDirVertical = DmtxDirUp | DmtxDirDown, DmtxSchemeEdifact,
DmtxDirRightUp = DmtxDirRight | DmtxDirUp, DmtxSchemeBase256
DmtxDirLeftDown = DmtxDirLeft | DmtxDirDown } DmtxScheme;
} DmtxDirection;
typedef enum {
DmtxEncodeAutoBest,
DmtxEncodeAutoFast,
DmtxEncodeSingleScheme
} DmtxEncodeMethod;
typedef enum { typedef enum {
DmtxSchemeEncodeAscii, DmtxSymbolRectAuto = -3,
DmtxSchemeEncodeC40, DmtxSymbolSquareAuto = -2,
DmtxSchemeEncodeText, DmtxSymbolShapeAuto = -1,
DmtxSchemeEncodeX12, DmtxSymbol10x10 = 0,
DmtxSchemeEncodeEdifact, DmtxSymbol12x12,
DmtxSchemeEncodeBase256, DmtxSymbol14x14,
DmtxSchemeEncodeAutoBest, DmtxSymbol16x16,
DmtxSchemeEncodeAutoFast DmtxSymbol18x18,
} DmtxSchemeEncode; DmtxSymbol20x20,
DmtxSymbol22x22,
DmtxSymbol24x24,
DmtxSymbol26x26,
DmtxSymbol32x32,
DmtxSymbol36x36,
DmtxSymbol40x40,
DmtxSymbol44x44,
DmtxSymbol48x48,
DmtxSymbol52x52,
DmtxSymbol64x64,
DmtxSymbol72x72,
DmtxSymbol80x80,
DmtxSymbol88x88,
DmtxSymbol96x96,
DmtxSymbol104x104,
DmtxSymbol120x120,
DmtxSymbol132x132,
DmtxSymbol144x144,
DmtxSymbol8x18,
DmtxSymbol8x32,
DmtxSymbol12x26,
DmtxSymbol12x36,
DmtxSymbol16x36,
DmtxSymbol16x48
} DmtxSymbolSize;
typedef enum { typedef enum {
DmtxSchemeDecodeAsciiStd, DmtxDirNone = 0x00,
DmtxSchemeDecodeAsciiExt, DmtxDirUp = 0x01 << 0,
DmtxSchemeDecodeC40, DmtxDirLeft = 0x01 << 1,
DmtxSchemeDecodeText, DmtxDirDown = 0x01 << 2,
DmtxSchemeDecodeX12, DmtxDirRight = 0x01 << 3,
DmtxSchemeDecodeEdifact, DmtxDirHorizontal = DmtxDirLeft | DmtxDirRight,
DmtxSchemeDecodeBase256 DmtxDirVertical = DmtxDirUp | DmtxDirDown,
} DmtxSchemeDecode; DmtxDirRightUp = DmtxDirRight | DmtxDirUp,
DmtxDirLeftDown = DmtxDirLeft | DmtxDirDown
} DmtxDirection;
typedef enum { typedef enum {
DmtxSymAttribSymbolRows, DmtxSymAttribSymbolRows,
DmtxSymAttribSymbolCols, DmtxSymAttribSymbolCols,
DmtxSymAttribDataRegionRows, DmtxSymAttribDataRegionRows,
DmtxSymAttribDataRegionCols, DmtxSymAttribDataRegionCols,
DmtxSymAttribHorizDataRegions, DmtxSymAttribHorizDataRegions,
DmtxSymAttribVertDataRegions, DmtxSymAttribVertDataRegions,
DmtxSymAttribMappingMatrixRows, DmtxSymAttribMappingMatrixRows,
DmtxSymAttribMappingMatrixCols, DmtxSymAttribMappingMatrixCols,
DmtxSymAttribInterleavedBlocks, DmtxSymAttribInterleavedBlocks,
DmtxSymAttribBlockErrorWords, DmtxSymAttribBlockErrorWords,
DmtxSymAttribBlockMaxCorrectable, DmtxSymAttribBlockMaxCorrectable,
DmtxSymAttribSymbolDataWords, DmtxSymAttribSymbolDataWords,
DmtxSymAttribSymbolErrorWords, DmtxSymAttribSymbolErrorWords,
DmtxSymAttribSymbolMaxCorrectable DmtxSymAttribSymbolMaxCorrectable
} DmtxSymAttribute; } DmtxSymAttribute;
typedef enum { typedef enum {
DmtxCorner00 = 0x01 << 0, DmtxCorner00 = 0x01 << 0,
DmtxCorner10 = 0x01 << 1, DmtxCorner10 = 0x01 << 1,
DmtxCorner11 = 0x01 << 2, DmtxCorner11 = 0x01 << 2,
DmtxCorner01 = 0x01 << 3 DmtxCorner01 = 0x01 << 3
} DmtxCornerLoc; } DmtxCornerLoc;
typedef enum { typedef enum {
/* Encoding properties */ /* Encoding properties */
DmtxPropScheme = 100, DmtxPropScheme = 100,
DmtxPropSizeRequest, DmtxPropSizeRequest,
DmtxPropMarginSize, DmtxPropMarginSize,
DmtxPropModuleSize, DmtxPropModuleSize,
/* Decoding properties */ /* Decoding properties */
DmtxPropEdgeMin = 200, DmtxPropEdgeMin = 200,
skipping to change at line 177 skipping to change at line 195
DmtxPropChannelCount, DmtxPropChannelCount,
/* Image modifiers */ /* Image modifiers */
DmtxPropXmin = 400, DmtxPropXmin = 400,
DmtxPropXmax, DmtxPropXmax,
DmtxPropYmin, DmtxPropYmin,
DmtxPropYmax, DmtxPropYmax,
DmtxPropScale DmtxPropScale
} DmtxProperty; } DmtxProperty;
typedef enum { typedef enum {
DmtxSymbolRectAuto = -3,
DmtxSymbolSquareAuto = -2,
DmtxSymbolShapeAuto = -1,
DmtxSymbol10x10 = 0,
DmtxSymbol12x12,
DmtxSymbol14x14,
DmtxSymbol16x16,
DmtxSymbol18x18,
DmtxSymbol20x20,
DmtxSymbol22x22,
DmtxSymbol24x24,
DmtxSymbol26x26,
DmtxSymbol32x32,
DmtxSymbol36x36,
DmtxSymbol40x40,
DmtxSymbol44x44,
DmtxSymbol48x48,
DmtxSymbol52x52,
DmtxSymbol64x64,
DmtxSymbol72x72,
DmtxSymbol80x80,
DmtxSymbol88x88,
DmtxSymbol96x96,
DmtxSymbol104x104,
DmtxSymbol120x120,
DmtxSymbol132x132,
DmtxSymbol144x144,
DmtxSymbol8x18,
DmtxSymbol8x32,
DmtxSymbol12x26,
DmtxSymbol12x36,
DmtxSymbol16x36,
DmtxSymbol16x48
} DmtxSymbolSize;
typedef enum {
/* Custom format */ /* Custom format */
DmtxPackCustom = 100, DmtxPackCustom = 100,
/* 1 bpp */ /* 1 bpp */
DmtxPack1bppK = 200, DmtxPack1bppK = 200,
/* 8 bpp grayscale */ /* 8 bpp grayscale */
DmtxPack8bppK = 300, DmtxPack8bppK = 300,
/* 16 bpp formats */ /* 16 bpp formats */
DmtxPack16bppRGB = 400, DmtxPack16bppRGB = 400,
DmtxPack16bppRGBX, DmtxPack16bppRGBX,
DmtxPack16bppXRGB, DmtxPack16bppXRGB,
skipping to change at line 240 skipping to change at line 222
DmtxPack24bppYCbCr, DmtxPack24bppYCbCr,
/* 32 bpp formats */ /* 32 bpp formats */
DmtxPack32bppRGBX = 600, DmtxPack32bppRGBX = 600,
DmtxPack32bppXRGB, DmtxPack32bppXRGB,
DmtxPack32bppBGRX, DmtxPack32bppBGRX,
DmtxPack32bppXBGR, DmtxPack32bppXBGR,
DmtxPack32bppCMYK DmtxPack32bppCMYK
} DmtxPackOrder; } DmtxPackOrder;
typedef enum { typedef enum {
DmtxFlipNone = 0x00, DmtxFlipNone = 0x00,
DmtxFlipX = 0x01 << 0, DmtxFlipX = 0x01 << 0,
DmtxFlipY = 0x01 << 1 DmtxFlipY = 0x01 << 1
} DmtxFlip; } DmtxFlip;
typedef double DmtxMatrix3[3][3]; typedef double DmtxMatrix3[3][3];
/** /**
* @struct DmtxPixelLoc * @struct DmtxPixelLoc
* @brief DmtxPixelLoc * @brief DmtxPixelLoc
*/ */
typedef struct DmtxPixelLoc_struct { typedef struct DmtxPixelLoc_struct {
int X; int X;
int Y; int Y;
} DmtxPixelLoc; } DmtxPixelLoc;
/** /**
* @struct DmtxVector2 * @struct DmtxVector2
* @brief DmtxVector2 * @brief DmtxVector2
*/ */
typedef struct DmtxVector2_struct { typedef struct DmtxVector2_struct {
double X; double X;
double Y; double Y;
} DmtxVector2; } DmtxVector2;
/** /**
* @struct DmtxRay2 * @struct DmtxRay2
* @brief DmtxRay2 * @brief DmtxRay2
*/ */
typedef struct DmtxRay2_struct { typedef struct DmtxRay2_struct {
double tMin, tMax; double tMin;
DmtxVector2 p; double tMax;
DmtxVector2 v; DmtxVector2 p;
DmtxVector2 v;
} DmtxRay2; } DmtxRay2;
/** /**
* @struct DmtxImage * @struct DmtxImage
* @brief DmtxImage * @brief DmtxImage
*/ */
typedef struct DmtxImage_struct { typedef struct DmtxImage_struct {
int width; int width;
int height; int height;
int pixelPacking; int pixelPacking;
int bitsPerPixel; int bitsPerPixel;
int bytesPerPixel; int bytesPerPixel;
int rowPadBytes; int rowPadBytes;
int rowSizeBytes; int rowSizeBytes;
int imageFlip; int imageFlip;
int channelCount; int channelCount;
int channelStart[4]; int channelStart[4];
int bitsPerChannel[4]; int bitsPerChannel[4];
unsigned char *pxl; unsigned char *pxl;
} DmtxImage; } DmtxImage;
/** /**
* @struct DmtxPointFlow * @struct DmtxPointFlow
* @brief DmtxPointFlow * @brief DmtxPointFlow
*/ */
typedef struct DmtxPointFlow_struct { typedef struct DmtxPointFlow_struct {
int plane; int plane;
int arrive; int arrive;
int depart; int depart;
int mag; int mag;
DmtxPixelLoc loc; DmtxPixelLoc loc;
} DmtxPointFlow; } DmtxPointFlow;
/** /**
* @struct DmtxBestLine * @struct DmtxBestLine
* @brief DmtxBestLine * @brief DmtxBestLine
*/ */
typedef struct DmtxBestLine_struct { typedef struct DmtxBestLine_struct {
int angle; int angle;
int hOffset; int hOffset;
int mag; int mag;
int stepBeg; int stepBeg;
int stepPos; int stepPos;
int stepNeg; int stepNeg;
int distSq; int distSq;
double devn; double devn;
DmtxPixelLoc locBeg; DmtxPixelLoc locBeg;
DmtxPixelLoc locPos; DmtxPixelLoc locPos;
DmtxPixelLoc locNeg; DmtxPixelLoc locNeg;
} DmtxBestLine; } DmtxBestLine;
/** /**
* @struct DmtxRegion * @struct DmtxRegion
* @brief DmtxRegion * @brief DmtxRegion
*/ */
typedef struct DmtxRegion_struct { typedef struct DmtxRegion_struct {
/* Trail blazing values */ /* Trail blazing values */
int jumpToPos; /* */ int jumpToPos; /* */
skipping to change at line 387 skipping to change at line 370
/** /**
* @struct DmtxMessage * @struct DmtxMessage
* @brief DmtxMessage * @brief DmtxMessage
*/ */
typedef struct DmtxMessage_struct { typedef struct DmtxMessage_struct {
size_t arraySize; /* mappingRows * mappingCols */ size_t arraySize; /* mappingRows * mappingCols */
size_t codeSize; /* Size of encoded data (data words + err or words) */ size_t codeSize; /* Size of encoded data (data words + err or words) */
size_t outputSize; /* Size of buffer used to hold decoded da ta */ size_t outputSize; /* Size of buffer used to hold decoded da ta */
int outputIdx; /* Internal index used to store output pr ogress */ int outputIdx; /* Internal index used to store output pr ogress */
int padCount; int padCount;
unsigned char *array; /* Pointer to internal representation of unsigned char *array; /* Pointer to internal representation of
scanned Data Matrix modules */ Data Matrix modules */
unsigned char *code; /* Pointer to internal storage of code wo unsigned char *code; /* Pointer to internal storage of code wo
rds (data and error) */ rds (data and error) */
unsigned char *output; /* Pointer to internal storage of decoded unsigned char *output; /* Pointer to internal storage of decoded
output */ output */
} DmtxMessage; } DmtxMessage;
/** /**
* @struct DmtxScanGrid * @struct DmtxScanGrid
* @brief DmtxScanGrid * @brief DmtxScanGrid
*/ */
typedef struct DmtxScanGrid_struct { typedef struct DmtxScanGrid_struct {
/* set once */ /* set once */
int minExtent; /* Smallest cross size used in scan */ int minExtent; /* Smallest cross size used in scan */
int maxExtent; /* Size of bounding grid region (2^N - 1) */ int maxExtent; /* Size of bounding grid region (2^N - 1)
int xOffset; /* Offset to obtain image X coordinate */ */
int yOffset; /* Offset to obtain image Y coordinate */ int xOffset; /* Offset to obtain image X coordinate */
int xMin; /* Minimum X in image coordinate system */ int yOffset; /* Offset to obtain image Y coordinate */
int xMax; /* Maximum X in image coordinate system */ int xMin; /* Minimum X in image coordinate system *
int yMin; /* Minimum Y in image coordinate system */ /
int yMax; /* Maximum Y in image coordinate system */ int xMax; /* Maximum X in image coordinate system *
/
int yMin; /* Minimum Y in image coordinate system *
/
int yMax; /* Maximum Y in image coordinate system *
/
/* reset for each level */ /* reset for each level */
int total; /* Total number of crosses at this size */ int total; /* Total number of crosses at this size *
int extent; /* Length/width of cross in pixels */ /
int jumpSize; /* Distance in pixels between cross centers */ int extent; /* Length/width of cross in pixels */
int pixelTotal; /* Total pixel count within an individual cross path */ int jumpSize; /* Distance in pixels between cross cente
int startPos; /* X and Y coordinate of first cross center in pattern * rs */
/ int pixelTotal; /* Total pixel count within an individual
cross path */
int startPos; /* X and Y coordinate of first cross cent
er in pattern */
/* reset for each cross */ /* reset for each cross */
int pixelCount; /* Progress (pixel count) within current cross pattern * int pixelCount; /* Progress (pixel count) within current
/ cross pattern */
int xCenter; /* X center of current cross pattern */ int xCenter; /* X center of current cross pattern */
int yCenter; /* Y center of current cross pattern */ int yCenter; /* Y center of current cross pattern */
} DmtxScanGrid; } DmtxScanGrid;
/** /**
* @struct DmtxTime * @struct DmtxTime
* @brief DmtxTime * @brief DmtxTime
*/ */
typedef struct DmtxTime_struct { typedef struct DmtxTime_struct {
time_t sec; time_t sec;
unsigned long usec; unsigned long usec;
} DmtxTime; } DmtxTime;
/** /**
* @struct DmtxDecode * @struct DmtxDecode
* @brief DmtxDecode * @brief DmtxDecode
*/ */
typedef struct DmtxDecode_struct { typedef struct DmtxDecode_struct {
/* Options */ /* Options */
int edgeMin; int edgeMin;
int edgeMax; int edgeMax;
skipping to change at line 450 skipping to change at line 433
int edgeThresh; int edgeThresh;
/* Image modifiers */ /* Image modifiers */
int xMin; int xMin;
int xMax; int xMax;
int yMin; int yMin;
int yMax; int yMax;
int scale; int scale;
/* Internals */ /* Internals */
unsigned char *cache; /* int cacheComplete; */
DmtxImage *image; unsigned char *cache;
DmtxImage *image;
DmtxScanGrid grid; DmtxScanGrid grid;
} DmtxDecode; } DmtxDecode;
/** /**
* @struct DmtxEncode * @struct DmtxEncode
* @brief DmtxEncode * @brief DmtxEncode
*/ */
typedef struct DmtxEncode_struct { typedef struct DmtxEncode_struct {
int method; int method;
int scheme; int scheme;
int sizeIdxRequest; int sizeIdxRequest;
int marginSize; int marginSize;
int moduleSize; int moduleSize;
int pixelPacking; int pixelPacking;
int imageFlip; int imageFlip;
int rowPadBytes; int rowPadBytes;
DmtxMessage *message; DmtxMessage *message;
DmtxImage *image; DmtxImage *image;
DmtxRegion region; DmtxRegion region;
DmtxMatrix3 xfrm; /* XXX still necessary? */ DmtxMatrix3 xfrm; /* XXX still necessary? */
DmtxMatrix3 rxfrm; /* XXX still necessary? */ DmtxMatrix3 rxfrm; /* XXX still necessary? */
} DmtxEncode; } DmtxEncode;
/** /**
* @struct DmtxChannel * @struct DmtxChannel
* @brief DmtxChannel * @brief DmtxChannel
*/ */
typedef struct DmtxChannel_struct { typedef struct DmtxChannel_struct {
DmtxSchemeEncode encScheme; /* current encodation scheme */ int encScheme; /* current encodation scheme */
int invalid; /* channel status (invalid if non- int invalid; /* channel status (invalid if non-zero) *
zero) */ /
unsigned char *inputPtr; /* pointer to current input charac unsigned char *inputPtr; /* pointer to current input character */
ter */ unsigned char *inputStop; /* pointer to position after final input
unsigned char *inputStop; /* pointer to position after final character */
input character */ int encodedLength; /* encoded length (units of 2/3 bits) */
int encodedLength; /* encoded length (units of 2/3 bi int currentLength; /* current length (units of 2/3 bits) */
ts) */ int firstCodeWord; /* */
int currentLength; /* current length (units of 2/3 bi unsigned char encodedWords[1558];
ts) */
int firstCodeWord; /* */
unsigned char encodedWords[1558]; /* array of encoded codewords */
} DmtxChannel; } DmtxChannel;
/* Wrap in a struct for fast copies */ /* Wrap in a struct for fast copies */
/** /**
* @struct DmtxChannelGroup * @struct DmtxChannelGroup
* @brief DmtxChannelGroup * @brief DmtxChannelGroup
*/ */
typedef struct DmtxChannelGroup_struct { typedef struct DmtxChannelGroup_struct {
DmtxChannel channel[6]; DmtxChannel channel[6];
} DmtxChannelGroup; } DmtxChannelGroup;
/** /**
* @struct DmtxTriplet * @struct DmtxTriplet
* @brief DmtxTriplet * @brief DmtxTriplet
*/ */
typedef struct DmtxTriplet_struct { typedef struct DmtxTriplet_struct {
unsigned char value[3]; unsigned char value[3];
} DmtxTriplet; } DmtxTriplet;
/** /**
* @struct DmtxQuadruplet * @struct DmtxQuadruplet
* @brief DmtxQuadruplet * @brief DmtxQuadruplet
*/ */
typedef struct DmtxQuadruplet_struct { typedef struct DmtxQuadruplet_struct {
unsigned char value[4]; unsigned char value[4];
} DmtxQuadruplet; } DmtxQuadruplet;
/* dmtxtime.c */ /* dmtxtime.c */
extern DmtxTime dmtxTimeNow(void); extern DmtxTime dmtxTimeNow(void);
extern DmtxTime dmtxTimeAdd(DmtxTime t, long msec); extern DmtxTime dmtxTimeAdd(DmtxTime t, long msec);
extern int dmtxTimeExceeded(DmtxTime timeout); extern int dmtxTimeExceeded(DmtxTime timeout);
/* dmtxencode.c */ /* dmtxencode.c */
extern DmtxEncode *dmtxEncodeCreate(void); extern DmtxEncode *dmtxEncodeCreate(void);
extern DmtxPassFail dmtxEncodeDestroy(DmtxEncode **enc); extern DmtxPassFail dmtxEncodeDestroy(DmtxEncode **enc);
skipping to change at line 534 skipping to change at line 518
extern int dmtxEncodeGetProp(DmtxEncode *enc, int prop); extern int dmtxEncodeGetProp(DmtxEncode *enc, int prop);
extern DmtxPassFail dmtxEncodeDataMatrix(DmtxEncode *enc, int n, unsigned c har *s); extern DmtxPassFail dmtxEncodeDataMatrix(DmtxEncode *enc, int n, unsigned c har *s);
extern DmtxPassFail dmtxEncodeDataMosaic(DmtxEncode *enc, int n, unsigned c har *s); extern DmtxPassFail dmtxEncodeDataMosaic(DmtxEncode *enc, int n, unsigned c har *s);
/* dmtxdecode.c */ /* dmtxdecode.c */
extern DmtxDecode *dmtxDecodeCreate(DmtxImage *img, int scale); extern DmtxDecode *dmtxDecodeCreate(DmtxImage *img, int scale);
extern DmtxPassFail dmtxDecodeDestroy(DmtxDecode **dec); extern DmtxPassFail dmtxDecodeDestroy(DmtxDecode **dec);
extern DmtxPassFail dmtxDecodeSetProp(DmtxDecode *dec, int prop, int value) ; extern DmtxPassFail dmtxDecodeSetProp(DmtxDecode *dec, int prop, int value) ;
extern int dmtxDecodeGetProp(DmtxDecode *dec, int prop); extern int dmtxDecodeGetProp(DmtxDecode *dec, int prop);
extern /*@exposed@*/ unsigned char *dmtxDecodeGetCache(DmtxDecode *dec, int x, int y); extern /*@exposed@*/ unsigned char *dmtxDecodeGetCache(DmtxDecode *dec, int x, int y);
extern DmtxPassFail dmtxDecodeGetPixelValue(DmtxDecode *dec, int x, int y, int channel, int *value); extern DmtxPassFail dmtxDecodeGetPixelValue(DmtxDecode *dec, int x, int y, int channel, /*@out@*/ int *value);
extern DmtxMessage *dmtxDecodeMatrixRegion(DmtxDecode *dec, DmtxRegion *reg , int fix); extern DmtxMessage *dmtxDecodeMatrixRegion(DmtxDecode *dec, DmtxRegion *reg , int fix);
extern DmtxMessage *dmtxDecodeMosaicRegion(DmtxDecode *dec, DmtxRegion *reg , int fix); extern DmtxMessage *dmtxDecodeMosaicRegion(DmtxDecode *dec, DmtxRegion *reg , int fix);
extern unsigned char *dmtxDecodeCreateDiagnostic(DmtxDecode *dec, /*@out@*/ int *totalBytes, /*@out@*/ int *headerBytes, int style); extern unsigned char *dmtxDecodeCreateDiagnostic(DmtxDecode *dec, /*@out@*/ int *totalBytes, /*@out@*/ int *headerBytes, int style);
/* dmtxregion.c */ /* dmtxregion.c */
extern DmtxRegion *dmtxRegionCreate(DmtxRegion *reg); extern DmtxRegion *dmtxRegionCreate(DmtxRegion *reg);
extern DmtxPassFail dmtxRegionDestroy(DmtxRegion **reg); extern DmtxPassFail dmtxRegionDestroy(DmtxRegion **reg);
extern DmtxRegion *dmtxRegionFindNext(DmtxDecode *dec, DmtxTime *timeout); extern DmtxRegion *dmtxRegionFindNext(DmtxDecode *dec, DmtxTime *timeout);
extern DmtxRegion *dmtxRegionScanPixel(DmtxDecode *dec, int x, int y); extern DmtxRegion *dmtxRegionScanPixel(DmtxDecode *dec, int x, int y);
extern DmtxPassFail dmtxRegionUpdateCorners(DmtxDecode *dec, DmtxRegion *re g, DmtxVector2 p00, extern DmtxPassFail dmtxRegionUpdateCorners(DmtxDecode *dec, DmtxRegion *re g, DmtxVector2 p00,
skipping to change at line 559 skipping to change at line 543
extern DmtxMessage *dmtxMessageCreate(int sizeIdx, int symbolFormat); extern DmtxMessage *dmtxMessageCreate(int sizeIdx, int symbolFormat);
extern DmtxPassFail dmtxMessageDestroy(DmtxMessage **msg); extern DmtxPassFail dmtxMessageDestroy(DmtxMessage **msg);
/* dmtximage.c */ /* dmtximage.c */
extern DmtxImage *dmtxImageCreate(unsigned char *pxl, int width, int height , int pack); extern DmtxImage *dmtxImageCreate(unsigned char *pxl, int width, int height , int pack);
extern DmtxPassFail dmtxImageDestroy(DmtxImage **img); extern DmtxPassFail dmtxImageDestroy(DmtxImage **img);
extern DmtxPassFail dmtxImageSetChannel(DmtxImage *img, int channelStart, i nt bitsPerChannel); extern DmtxPassFail dmtxImageSetChannel(DmtxImage *img, int channelStart, i nt bitsPerChannel);
extern DmtxPassFail dmtxImageSetProp(DmtxImage *img, int prop, int value); extern DmtxPassFail dmtxImageSetProp(DmtxImage *img, int prop, int value);
extern int dmtxImageGetProp(DmtxImage *img, int prop); extern int dmtxImageGetProp(DmtxImage *img, int prop);
extern int dmtxImageGetByteOffset(DmtxImage *img, int x, int y); extern int dmtxImageGetByteOffset(DmtxImage *img, int x, int y);
extern DmtxPassFail dmtxImageGetPixelValue(DmtxImage *img, int x, int y, in t channel, int *value); extern DmtxPassFail dmtxImageGetPixelValue(DmtxImage *img, int x, int y, in t channel, /*@out@*/ int *value);
extern DmtxPassFail dmtxImageSetPixelValue(DmtxImage *img, int x, int y, in t channel, int value); extern DmtxPassFail dmtxImageSetPixelValue(DmtxImage *img, int x, int y, in t channel, int value);
extern DmtxBoolean dmtxImageContainsInt(DmtxImage *img, int margin, int x, int y); extern DmtxBoolean dmtxImageContainsInt(DmtxImage *img, int margin, int x, int y);
extern DmtxBoolean dmtxImageContainsFloat(DmtxImage *img, double x, double y); extern DmtxBoolean dmtxImageContainsFloat(DmtxImage *img, double x, double y);
/* dmtxvector2.c */ /* dmtxvector2.c */
extern DmtxVector2 *dmtxVector2AddTo(DmtxVector2 *v1, const DmtxVector2 *v2 ); extern DmtxVector2 *dmtxVector2AddTo(DmtxVector2 *v1, const DmtxVector2 *v2 );
extern DmtxVector2 *dmtxVector2Add(/*@out@*/ DmtxVector2 *vOut, const DmtxV ector2 *v1, const DmtxVector2 *v2); extern DmtxVector2 *dmtxVector2Add(/*@out@*/ DmtxVector2 *vOut, const DmtxV ector2 *v1, const DmtxVector2 *v2);
extern DmtxVector2 *dmtxVector2SubFrom(DmtxVector2 *v1, const DmtxVector2 * v2); extern DmtxVector2 *dmtxVector2SubFrom(DmtxVector2 *v1, const DmtxVector2 * v2);
extern DmtxVector2 *dmtxVector2Sub(/*@out@*/ DmtxVector2 *vOut, const DmtxV ector2 *v1, const DmtxVector2 *v2); extern DmtxVector2 *dmtxVector2Sub(/*@out@*/ DmtxVector2 *vOut, const DmtxV ector2 *v1, const DmtxVector2 *v2);
extern DmtxVector2 *dmtxVector2ScaleBy(DmtxVector2 *v, double s); extern DmtxVector2 *dmtxVector2ScaleBy(DmtxVector2 *v, double s);
 End of changes. 33 change blocks. 
169 lines changed or deleted 158 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/