QRCode - Demonstration

Encode this text

* For this demo, no more than 200 characters allowed
Configurations
  • Scale
    * For this demo, you can only set 1 to 4
  • Foreground Color
  • Background Color
  • Size
  • Error Level
  • Mirror
Code Result
<?php
require_once('BCGColor.php');
require_once('BCGDrawing.php');
require_once('BCGdatamatrix.barcode2d.php');
 
$colorfg = new BCGColor(0, 0, 0);
$colorbg = new BCGColor(255, 255, 255);
 
// Barcode part Part
$code = new BCGqrcode();
$code->setScale(3);
$code->setSize(BCGqrcode::QRCODE_SIZE_FULL);
$code->setErrorLevel(1);
$code->setMirror(false);
$code->setColor($colorfg, $colorbg);
$code->parse('QRCode');
 
// Drawing Part
$drawing = new BCGDrawing('', $colorbg);
$drawing->setBarcode($code);
$drawing->draw();
 
header('Content-Type: image/png');
 
$drawing->finish(BCGDrawing::IMG_FORMAT_PNG);
?>