EQRCode.PNG (EQRCode v0.1.10) View Source
Render the QR Code matrix in PNG format.
Link to this section Summary
Functions
Returns the PNG binary representation of the QR Code
Link to this section Functions
Specs
Returns the PNG binary representation of the QR Code
Options
You can specify the following attributes of the QR code:
:color
- In binary format. The default is<<0, 0, 0>>
:background_color
- In binary format or:transparent
. The default is<<255, 255, 255>>
:width
- The width of the QR code in pixel. (the actual size may vary, due to the number of modules in the code)
By default, QR code size will be dynamically generated based on the input string.
Examples
qr_code_content
|> EQRCode.encode()
|> EQRCode.png(color: <<255, 0, 255>>, width: 200)