Xbasic
QRCode::Creator::GeneratePng Method
Syntax
PUBLIC STATIC GeneratePng AS B (text AS C, correctionLevel AS C)
Arguments
- text AS C
QRCode input
- correctionLevel AS C
Correction level can be L,M,Q or H (L=7%, M=15%, Q=25%, H=30%). See QRCode Namespace for more information.
Description
GeneratePng returns a blob containing the contents of a .PNG formatted QRCode image.
Example
dim pngData as b = ::QRCode::Creator::GeneratePng("Hello world","M") dim html as c = "<p><img src=\"data:image/png;base64," + base64encode(pngData)+"\" /></p>" a5_show_html(html)
See Also