qrencode
4.1.1
About: libqrencode is a fast and compact library and command-line utility for encoding data in a QR Code symbol.
![]() ![]() |
Go to the source code of this file.
Data Structures | |
struct | MQRspec_Capacity |
Version and capacity. More... | |
Functions | |
int | MQRspec_getDataLengthBit (int version, QRecLevel level) |
Return maximum data code length (bits) for the version. More... | |
int | MQRspec_getDataLength (int version, QRecLevel level) |
Return maximum data code length (bytes) for the version. More... | |
int | MQRspec_getECCLength (int version, QRecLevel level) |
Return maximum error correction code length (bytes) for the version. More... | |
int | MQRspec_getWidth (int version) |
Return the width of the symbol for the version. More... | |
int | MQRspec_lengthIndicator (QRencodeMode mode, int version) |
Length indicator. More... | |
int | MQRspec_maximumWords (QRencodeMode mode, int version) |
Return the maximum length for the mode and version. More... | |
unsigned int | MQRspec_getFormatInfo (int mask, int version, QRecLevel level) |
Format information. More... | |
static void | putFinderPattern (unsigned char *frame, int width, int ox, int oy) |
Frame. More... | |
static unsigned char * | MQRspec_createFrame (int version) |
unsigned char * | MQRspec_newFrame (int version) |
Frame. More... | |
Variables | |
static const MQRspec_Capacity | mqrspecCapacity [4+1] |
Table of the capacity of symbols See Table 1 (pp.106) and Table 8 (pp.113) of Appendix 1, JIS X0510:2004. More... | |
static const int | lengthTableBits [4][4] |
Length indicator. More... | |
static const unsigned int | formatInfo [4][8] |
Format information. More... | |
static const int | typeTable [4+1][3] |
|
static |
Definition at line 187 of file mqrspec.c.
References mqrspecCapacity, putFinderPattern(), version, and MQRspec_Capacity::width.
Referenced by MQRspec_newFrame().
int MQRspec_getDataLength | ( | int | version, |
QRecLevel | level | ||
) |
Return maximum data code length (bytes) for the version.
version | version of the symbol |
level | error correction level |
Definition at line 70 of file mqrspec.c.
References level, MQRspec_getDataLengthBit(), and version.
Referenced by MQRraw_new().
int MQRspec_getDataLengthBit | ( | int | version, |
QRecLevel | level | ||
) |
Return maximum data code length (bits) for the version.
version | version of the symbol |
level | error correction level |
Definition at line 59 of file mqrspec.c.
References MQRspec_Capacity::ec, level, mqrspecCapacity, version, and MQRspec_Capacity::width.
Referenced by MQRraw_new(), MQRspec_getDataLength(), and QRinput_appendPaddingBitMQR().
int MQRspec_getECCLength | ( | int | version, |
QRecLevel | level | ||
) |
Return maximum error correction code length (bytes) for the version.
version | version of the symbol |
level | error correction level |
Definition at line 75 of file mqrspec.c.
References MQRspec_Capacity::ec, level, mqrspecCapacity, and version.
Referenced by MQRraw_new(), QRinput_newMQR(), and QRinput_setVersionAndErrorCorrectionLevel().
unsigned int MQRspec_getFormatInfo | ( | int | mask, |
int | version, | ||
QRecLevel | level | ||
) |
Format information.
Return BCH encoded format information pattern.
mask | mask number |
version | version of the symbol |
level | error correction level |
Definition at line 139 of file mqrspec.c.
References formatInfo, level, MQRSPEC_VERSION_MAX, QR_ECLEVEL_H, typeTable, and version.
Referenced by MMask_writeFormatInformation().
int MQRspec_getWidth | ( | int | version | ) |
Return the width of the symbol for the version.
version | version of the symbol |
Definition at line 80 of file mqrspec.c.
References mqrspecCapacity, version, and MQRspec_Capacity::width.
Referenced by MMask_makeMask(), MMask_mask(), and QRcode_encodeMaskMQR().
int MQRspec_lengthIndicator | ( | QRencodeMode | mode, |
int | version | ||
) |
Length indicator.
Return the size of length indicator for the mode and version.
mode | encode mode |
version | vesion of the symbol |
Definition at line 99 of file mqrspec.c.
References lengthTableBits, and version.
Referenced by QRinput_encodeMode8(), QRinput_encodeModeAn(), QRinput_encodeModeKanji(), QRinput_encodeModeNum(), and QRinput_estimateBitStreamSizeOfEntry().
int MQRspec_maximumWords | ( | QRencodeMode | mode, |
int | version | ||
) |
Return the maximum length for the mode and version.
mode | encode mode |
version | vesion of the symbol |
Definition at line 104 of file mqrspec.c.
References lengthTableBits, QR_MODE_KANJI, and version.
Referenced by QRinput_encodeBitStream().
unsigned char * MQRspec_newFrame | ( | int | version | ) |
Frame.
Return a copy of initialized frame.
version | version of the symbol |
Definition at line 227 of file mqrspec.c.
References MQRspec_createFrame(), MQRSPEC_VERSION_MAX, and version.
Referenced by QRcode_encodeMaskMQR().
|
static |
Frame.
Put a finder pattern.
frame | |
width | |
ox,oy | upper-left coordinate of the pattern |
Definition at line 162 of file mqrspec.c.
Referenced by MQRspec_createFrame().
|
static |
Format information.
Definition at line 123 of file mqrspec.c.
Referenced by MQRspec_getFormatInfo().
|
static |
Length indicator.
See Table 3 (pp.107) of Appendix 1, JIS X0510:2004.
Definition at line 92 of file mqrspec.c.
Referenced by MQRspec_lengthIndicator(), and MQRspec_maximumWords().
|
static |
Table of the capacity of symbols See Table 1 (pp.106) and Table 8 (pp.113) of Appendix 1, JIS X0510:2004.
Definition at line 51 of file mqrspec.c.
Referenced by MQRspec_createFrame(), MQRspec_getDataLengthBit(), MQRspec_getECCLength(), and MQRspec_getWidth().
|
static |
Definition at line 131 of file mqrspec.c.
Referenced by MQRspec_getFormatInfo().