API Reference
Class
QrCodeEncoder
Encodes QR codes (byte mode + optional Kanji mode).
Inheritance
- Object
- QrCodeEncoder
Methods
EncodeBytes 2 overloads
public static QrCode EncodeBytes(ReadOnlySpan<Byte> data, QrErrorCorrectionLevel ecc = M, Int32 minVersion = 1, Int32 maxVersion = 40, Nullable<Int32> forceMask = null, Nullable<Int32> eciAssignmentNumber = null) #Returns:
QrCodeEncodes an arbitrary byte payload (QR byte mode).
Parameters
- data System.Byte[]
- Bytes to encode.
- ecc CodeGlyphX.QrErrorCorrectionLevel = M
- Error correction level.
- minVersion System.Int32 = 1
- Minimum allowed QR version (1..40).
- maxVersion System.Int32 = 40
- Maximum allowed QR version (1..40).
- forceMask System.Nullable{System.Int32} = null
- Optional forced mask (0..7). When null, the best mask is chosen.
- eciAssignmentNumber System.Nullable{System.Int32} = null
- Optional ECI assignment number to emit before the payload.
EncodeBytes(System.ReadOnlySpan{System.Byte} data, CodeGlyphX.QrErrorCorrectionLevel ecc, System.Int32 minVersion, System.Int32 maxVersion, System.Nullable{System.Int32} forceMask, System.Nullable{System.Int32} eciAssignmentNumber) #Encodes an arbitrary byte payload (QR byte mode).
Parameters
- data System.ReadOnlySpan{System.Byte}
- Bytes to encode.
- ecc CodeGlyphX.QrErrorCorrectionLevel
- Error correction level.
- minVersion System.Int32
- Minimum allowed QR version (1..40).
- maxVersion System.Int32
- Maximum allowed QR version (1..40).
- forceMask System.Nullable{System.Int32}
- Optional forced mask (0..7). When null, the best mask is chosen.
- eciAssignmentNumber System.Nullable{System.Int32}
- Optional ECI assignment number to emit before the payload.
public static QrCode EncodeKanji(String text, QrErrorCorrectionLevel ecc = M, Int32 minVersion = 1, Int32 maxVersion = 40, Nullable<Int32> forceMask = null) #Returns:
QrCodeEncodes a QR Kanji-mode payload (Shift-JIS JIS X 0208).
Parameters
- text System.String
- Kanji text payload to encode.
- ecc CodeGlyphX.QrErrorCorrectionLevel = M
- Error correction level.
- minVersion System.Int32 = 1
- Minimum allowed QR version (1..40).
- maxVersion System.Int32 = 40
- Maximum allowed QR version (1..40).
- forceMask System.Nullable{System.Int32} = null
- Optional forced mask (0..7). When null, the best mask is chosen.
EncodeText 2 overloads
public static QrCode EncodeText(String text, QrErrorCorrectionLevel ecc = M, Int32 minVersion = 1, Int32 maxVersion = 40, Nullable<Int32> forceMask = null) #Returns:
QrCodeEncodes a UTF-8 text payload as a QR code.
Parameters
- text System.String
- Text payload to encode.
- ecc CodeGlyphX.QrErrorCorrectionLevel = M
- Error correction level.
- minVersion System.Int32 = 1
- Minimum allowed QR version (1..40).
- maxVersion System.Int32 = 40
- Maximum allowed QR version (1..40).
- forceMask System.Nullable{System.Int32} = null
- Optional forced mask (0..7). When null, the best mask is chosen.
public static QrCode EncodeText(String text, QrTextEncoding encoding, QrErrorCorrectionLevel ecc = M, Int32 minVersion = 1, Int32 maxVersion = 40, Nullable<Int32> forceMask = null, Boolean includeEci = true) #Returns:
QrCodeEncodes a text payload using a specific QR text encoding (optionally with ECI).
Parameters
- text System.String
- Text payload to encode.
- encoding CodeGlyphX.QrTextEncoding
- Encoding to use for QR byte mode.
- ecc CodeGlyphX.QrErrorCorrectionLevel = M
- Error correction level.
- minVersion System.Int32 = 1
- Minimum allowed QR version (1..40).
- maxVersion System.Int32 = 40
- Maximum allowed QR version (1..40).
- forceMask System.Nullable{System.Int32} = null
- Optional forced mask (0..7). When null, the best mask is chosen.
- includeEci System.Boolean = true
- When true, emits an ECI header for non-default encodings.