honzito/bacon-qr-code-basis

QR Code Generator for PHP - BaconQrCode cleaned to basic QRCode generator library with minimum requirements.

2023.208.6 2023-05-17 13:01 UTC

This package is auto-updated.

Last update: 2024-10-17 16:04:40 UTC


README

Introduction

BaconQrCode-Basis is simplified version of Bacon/BaconQrCode with minimal requirements and minimal use of external libraries. Only the basic functionality is left - generate classic b/w QR code to PNG file using standard GD library.

Example usage

require_once __DIR__.'/vendor/autoload.php';
use BaconQrCode\Renderer\GDLibRenderer;
use BaconQrCode\Writer;

$renderer = new GDLibRenderer(300);
$writer   = new Writer($renderer);
$qr_image = base64_encode($writer->writeString("Hola, hola"));
echo "<img src='data:image/png;base64,$qr_image' alt='QR Code'>";

//$writer->writeFile('Hello World!', 'qrcode.png');

Thanks

The code is taken from Bacon/BaconQrCode and GD lib backend from arxeiss//BaconQrCode