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);
?>