Table of Contents

Class Encoder

Namespace
ZXing.QrCode.Internal
Assembly
zxing.dll
public static class Encoder
Inheritance
Encoder
Inherited Members

Methods

chooseMode(string)

Chooses the mode.

public static Mode chooseMode(string content)

Parameters

content string

The content.

Returns

Mode

encode(string, ErrorCorrectionLevel)

Encode "bytes" with the error correction level "ecLevel". The encoding mode will be chosen internally by chooseMode(). On success, store the result in "qrCode". We recommend you to use QRCode.EC_LEVEL_L (the lowest level) for "getECLevel" since our primary use is to show QR code on desktop screens. We don't need very strong error correction for this purpose. Note that there is no way to encode bytes in MODE_KANJI. We might want to add EncodeWithMode() with which clients can specify the encoding mode. For now, we don't need the functionality.

public static QRCode encode(string content, ErrorCorrectionLevel ecLevel)

Parameters

content string

text to encode

ecLevel ErrorCorrectionLevel

error correction level to use

Returns

QRCode

QRCode representing the encoded QR code

encode(string, ErrorCorrectionLevel, IDictionary<EncodeHintType, object>)

Encodes the specified content.

public static QRCode encode(string content, ErrorCorrectionLevel ecLevel, IDictionary<EncodeHintType, object> hints)

Parameters

content string

The content.

ecLevel ErrorCorrectionLevel

The ec level.

hints IDictionary<EncodeHintType, object>

The hints.

Returns

QRCode