Demonstration - DataMatrix

Capable of being read by most mobile phones.
Generally used to label and track small items for inventory.
Has a very low error rate with internal error correction.
Barcode can be square or rectangular in shape.
* 30 character limit for this demo.

<?php
use BarcodeBakery\Common\BCGColor;
use BarcodeBakery\Common\BCGDrawing;
use BarcodeBakery\Barcode\BCGdatamatrix;

$colorBlack = new BCGColor(0, 0, 0);
$colorWhite = new BCGColor(255, 255, 255);

// Barcode Part
$code = new BCGdatamatrix();
$code->setScale(3);
$code->setForegroundColor($colorBlack);
$code->setBackgroundColor($colorWhite);
$code->parse('Datamatrix');

// Drawing Part
$drawing = new BCGDrawing($code, $colorWhite);

header('Content-Type: image/png');

$drawing->finish(BCGDrawing::IMG_FORMAT_PNG);
?>