qrencode
4.1.1
About: libqrencode is a fast and compact library and command-line utility for encoding data in a QR Code symbol.
![]() ![]() |
#include "qrencode.h"
Go to the source code of this file.
Macros | |
#define | MQRSPEC_WIDTH_MAX 17 |
Version and capacity. More... | |
#define | MQRSPEC_MODEID_NUM 0 |
Mode indicator. More... | |
#define | MQRSPEC_MODEID_AN 1 |
#define | MQRSPEC_MODEID_8 2 |
#define | MQRSPEC_MODEID_KANJI 3 |
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_getMinimumVersion (int size, QRecLevel level) |
Return a version number that satisfies the input code length. More... | |
int | MQRspec_getWidth (int version) |
Return the width of the symbol for the version. More... | |
int | MQRspec_getRemainder (int version) |
Return the numer of remainder bits. 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_getVersionPattern (int version) |
Version information pattern. More... | |
unsigned int | MQRspec_getFormatInfo (int mask, int version, QRecLevel level) |
Format information. More... | |
unsigned char * | MQRspec_newFrame (int version) |
Frame. More... | |
#define MQRSPEC_MODEID_NUM 0 |
#define MQRSPEC_WIDTH_MAX 17 |
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_getMinimumVersion | ( | int | size, |
QRecLevel | level | ||
) |
Return a version number that satisfies the input code length.
size | input code length (byte) |
level | error correction level |
int MQRspec_getRemainder | ( | int | version | ) |
Return the numer of remainder bits.
version | version of the symbol |
unsigned int MQRspec_getVersionPattern | ( | int | version | ) |
Version information pattern.
Return BCH encoded version information pattern that is used for the symbol of version 7 or greater. Use lower 18 bits.
version | vesion of the symbol |
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().