Bacon / BaconQrCode

QR Code Generator for PHP
BSD 2-Clause "Simplified" License
1.82k stars 208 forks source link

Add GD Image renderer #159

Closed arxeiss closed 5 months ago

arxeiss commented 5 months ago

Copy of closed #114


My client's web hosting provider sucks, and they don't have support for Imagick, even though they are promising it will be added.

I'm generating QR codes for payment, which is added into email body. And email client's do not have nice support for SVG. So I need old-school GD support.

However, GD has limited sets of functions. I believe, that it is OK, when that Renderer will have also limited sets of features. So this is not supported:

And because GD does not support Paths like Imagick or SVG do, I need to generate a bit different paths, so they are not so complex.


Sorry for opening new PR, but I had to change branch. I really needed the GD Renderer and in many projects I'm using this in package.json. Not to break them by changing commit name, I had to create new branch. But then it is not possible to change source branch in PR.

"repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/arxeiss/BaconQrCode"
        }
    ],
    "require": {
        "php": "^8.2",
        "bacon/bacon-qr-code": "dev-add-gd-backend#650e10121f4d8707ecdc5984b042cae7731e388a",
DASPRiD commented 5 months ago

LGTM! Would you mind adding a short section in the README about this alternative renderer?

DASPRiD commented 5 months ago

Please rebase against new main branch, had to do some maintenance :)