kazuhikoarase / qrcode-generator

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

White border around QR code #18

Closed obsidianart closed 8 years ago

obsidianart commented 8 years ago

I'm trying to remove the white border/padding around the QR code. Is there any option to generate a QR code without a white frame around? Thanks

kazuhikoarase commented 8 years ago

Hi, What api do you use? In case createImgTag function of javascript, you could apply zero on second argument to no margin. see also https://github.com/kazuhikoarase/qrcode-generator/issues/17

var create_qrcode = function(text, typeNumber, errorCorrectLevel, table) {
  var qr = qrcode(typeNumber || 4, errorCorrectLevel || 'M');
  qr.addData(text);
  qr.make();
  return qr.createImgTag(2, 0);
};
obsidianart commented 8 years ago

Thank you, I was using createImgBase64 but I didn't notice there was an option