barcode
barcode copied to clipboard
Add a centered logo in the QR Code
Hi folks, this is not an issue, i would like to know if this pckge supports adding a company logo in the center or corners of the QR Code?
Any news ?
Example
You can use Intervention Image to manipulate the QRCode. Example:
function generateQRCode($content)
{
/**
* result in data uri
*/
$img = Image::make(DNS2D::getBarcodePNG($content, 'QRCODE,H', 3, 3));
$logo = Image::make(storage_path('template-pdf/logo-barcode.png'))->resize(42,60);
return $img->insert($logo,'center')->encode('data-url')->encoded;
}
what is this Image class?
what is this Image class?
Yes, http://image.intervention.io/
Output sample, still scannable:
This requires an additional library :/ There is no other way? Could use some built-in function for this in your library, it would make your job easier