encode
fun encode(type: Int = typeForDataAndECL(data, errorCorrectionLevel), maskPattern: MaskPattern = MaskPattern.PATTERN000): QRCodeRawData(source)
Computes and encodes the data of this object into a QR Code. This method returns the raw data of the QR Code.
If you just want to render (create) a QR Code image, you are probably looking for the renderShaded method.
Return
The byte matrix of the encoded QRCode.
Parameters
type
type
value for the QRCode computation. Between 0 and 40. Read more about it here. Defaults to an automatically calculated value based on data and the errorCorrectionLevel.
mask Pattern
Mask Pattern to apply to the final QR Code. Basically changes how the QR Code looks at the end. Read more about it here. Defaults to MaskPattern.PATTERN000.