kakabali
kakabali

Reputation: 4033

how to add logo to qr codes

I am using zxing (java) to generate qr codes and want to know a method to add logo to the qr code. Is there any built in method for adding logo to it or any alternate for same.

Upvotes: 4

Views: 8091

Answers (2)

Pavlus
Pavlus

Reputation: 1711

You can use set, setRegion and flip methods of output BitMatrix to change bits in output matrix, and add any (if you have a good error correction level) monochrome image in your output code, or you can export your BitMatrix to mutable Image and do whatever you want with Image.getGraphics(), which gives you built-in Graphics object where you can draw as usual, but don't forget to increase your ERROR_CORRECTION level.

Upvotes: 4

Joban
Joban

Reputation: 1337

You will have to add an image overlay perhaps using another image library. I managed to find this resource that was able to do it. http://skrymerdev.wordpress.com/2012/09/22/qr-code-generation-with-zxing/

However I am certain you cannot add an image directly in the center of an QR code it will not allow the QR code to scan. You may be able to put a small one at the top.

enter image description here

Upvotes: 4

Related Questions