Closed bilogic closed 6 months ago
It is practically impossible to perform custom punch outs since there are final classes everywhere and AbstractGdWriter
directly instantiates MatrixFactory
to create $matrix
and renders the image all in 1 go in write(...)
.
In order to have a nicely laid out QR Code, certain info such as block_size
and pixel count are required so that we can adjust the logo and label accordingly. However, I can't see a way to share that information elegantly based on how builder::build()
is currently structured.
After much experimentation, a small refactor in AbstractGdWriter
can help make it customization. Hope the PR can be accepted. Thank you.
In v3.9.x, I extend the QrCode class to punch out QR code blocks nicely, i.e. I don't just paste a logo over the center, I actually remove whole cells of the QR code so that there is a clean area for pasting a logo.
How can I do this in 5.0?