module Goban::MQR::Encoder

Extended Modules

Defined in:

goban/mqr/encoder.cr

Instance Method Summary

Instance Method Detail

def determine_version_and_segments(text : String, ecl : ECC::Level) #

Returns a tuple of the optimized segments and Micro QR Code version for the given text and error correction level.


def encode_segments(segments : Array(Segment), ecl : ECC::Level, version : Version | Int) #

Creates a new Micro QR Code object for the given data segments, error correction level, and Micro QR Code version that is large enough to contain all the data in the segments.

See QR::Encoder.encode_segments for more information.


def encode_string(text : String, ecl : ECC::Level = ECC::Level::Medium) #

Creates a new Micro QR Code object for the given string and error correction level.

Note that Micro QR Codes have limited EC levels you can select depending on the length of the text. In version M1, the EC level passed will just be ignored.

See QR::Encoder.encode_string for more information.