Livecode Wiki

Create a QR code.

Built-in Message handler[]


qrCreate pImg,pData,pECC,pSize,pMask


  • pImg: The name of an image object on the card, a filename or the special code "!" which will return the image data in the result.
  • pData: The data to be encoded.
  • pECC: The error correction level:
    • "L": 7% error correction
    • "M": 15% error correction
    • "Q" : 25% error correction
    • "H" : 30% error correction
  • pSize: Module size you can make the code larger/smaller. You can also just rescale the image after the code has been created.
  • Mask: An integer value between 0 and 7. When encoding a QR code, there are eight mask patterns that you can use to change the outputted matrix. Each mask pattern changes the bits according to their coordinates in the QR matrix. The purpose of a mask pattern is to make the QR code easier for a QR scanner to read.


qrCreate "MyImage", "QR data", "M", 3

Set the text of an image to a QR code or get the PMG data of the QR code image.

See also: QrSetColors