PHP code example of karmabunny / bacon-backends

1. Go to this page and download the library: Download karmabunny/bacon-backends library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

karmabunny / bacon-backends example snippets


use BaconQrCode\Renderer\ImageRenderer;
use BaconQrCode\Renderer\RendererStyle\RendererStyle;
use BaconQrCode\Writer;
use karmabunny\BaconBackends\GdImageBackEnd;
use karmabunny\BaconBackends\ImagickDumbBackEnd;

$renderer = new ImageRenderer(
    new RendererStyle(400),
    new ImagickDumbBackEnd(),
    // or new GdImageBackEnd(),
);
$writer = new Writer($renderer);
$writer->writeFile('Hello World!', 'qrcode.png');