mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-10-08 21:05:50 +00:00
🛀 data mode rework
This commit is contained in:
@@ -36,9 +36,12 @@ $options->logoHeight = 13;
|
||||
$options->scale = 5;
|
||||
$options->imageTransparent = false;
|
||||
|
||||
$qrcode = new QRCode($options);
|
||||
$qrcode->addByteSegment($data);
|
||||
|
||||
header('Content-type: image/png');
|
||||
|
||||
$qrOutputInterface = new QRImageWithLogo($options, (new QRCode($options))->getMatrix($data));
|
||||
$qrOutputInterface = new QRImageWithLogo($options, $qrcode->getMatrix());
|
||||
|
||||
// dump the output, with an additional logo
|
||||
echo $qrOutputInterface->dump(null, __DIR__.'/octocat.png');
|
||||
|
||||
Reference in New Issue
Block a user