clib Multimedia
qrcode
QR code generation using libqrencode. Output as PNG file, SVG, ANSI terminal art or base64 data URL.
Install ppm install qrcode
Usage Example
uses qrcode; // Save as PNG ToFile('https://pascalai.org', 'site-qr.png', 256); // SVG for web var svg := ToSVG('https://registry.pascalai.org'); file_utils.WriteFile('qr.svg', svg); // Terminal display WriteLn(ToANSI('Hello, PPM!')); // Data URL for HTML var url := ToDataURL('pay://invoice/42', 512); var img := '';
Features
PNG file output with configurable size
SVG vector output for web
ANSI block-character terminal display
Base64 data URL for HTML embedding
Error correction level configuration
← Back to Package Index