Open CodelineRed opened 1 month ago
logoPunchoutBackground(true) has no effect on SVG files.
logoPunchoutBackground(true)
<?php use Endroid\QrCode\Builder\Builder; use Endroid\QrCode\Encoding\Encoding; use Endroid\QrCode\Writer\PngWriter; use Endroid\QrCode\Writer\SvgWriter; foreach (['png', 'svg'] as $extension) { $generalBuilder = Builder::create(); if ($extension === 'png') { $generalBuilder->writer(new PngWriter()); } else { $generalBuilder->writer(new SvgWriter()); } $generalBuilder->writerOptions([]) ->data('https://github.com/Bacon/BaconQrCode') ->encoding(new Encoding('UTF-8')) ->size(320) ->margin(10) ->logoPath('logo.png') ->logoResizeToWidth(100) ->logoPunchoutBackground(true); } $generalBuilder->build()->saveToFile('qrcode.' . $extension); }
Tested with 5.1.0
Confirmed with v6.0.0
logoPunchoutBackground(true)
has no effect on SVG files.Tested with 5.1.0