kazuhikoarase / qrcode-generator

QR Code Generator implementation in JavaScript, Java and more.
https://kazuhikoarase.github.io/qrcode-generator/js/demo/
MIT License
2.13k stars 685 forks source link

Added error checking and additional params to createImage #15

Closed DoktorJ closed 9 years ago

DoktorJ commented 9 years ago

Added parameters for foreground and background colors, as well as a flag for transparent background, to QRCode->createImage(). Also added basic error checking on values for parameters.

New syntax (backwards-compatible with old) is $qr->createImage(2, 4, 0x0000FF, 0x000000, true); where 0x0000FF is the foreground color (blue), 0x000000 is the background color (black; not relevant in this case because of next param), and true is to use transparent background.

kazuhikoarase commented 9 years ago

Thank u !