
As I explored the Google Chart API for generating QR code images, I noted a particular parameter - CHLD, where you can configure the error correction level for the generated QR code. Setting this parameter to "H" allows for data recovery up to 30% of loss rate. Given the intent of QR codes being used in the physical world, this level of redundancy is critical, to account for wear & tear on the physical QR code image. This peaked my interest. What if I were to deliberately cause data loss... by digitally applying a branding logo over my QR code images?
Branding a QR Code
I have seen minor revisions or "branding" of QR codes, mostly where individuals have added a rather small logo to the center of a QR Code. It occurred to me that using the Google Charts CHLD parameter in conjunction with a URL shortening service (to minimize my payload size), may allow for me to brand a much larger surface area of a QR code image. Using bit.ly and Google Charts, I placed a logo over the center portion (data portion) on a number of QR code images, implemented with the CSS position property. By doing this, I discovered that I was able to cover up a significant portion of the QR code with my own branding, while maintaining the data integrity of the QR code image itself.
<img style="position: absolute; top:200px; left:100px;" src="https://chart.googleapis.com/chart?chs=240x240&chld=H&cht=qr&chl=http://ibm.co/fgA5LQ&choe=UTF-8" alt="Bob Leah" />
<img style="position: absolute; top:270px; left:170px; height:95px; width:95px;"src="https://www.ibm.com/developerworks/mydeveloperworks/blogs/bobleah/resource/bob.gif" />
<img style="position: absolute; top:375px; left:145px; height:20px; width:20px;" src="https://www.ibm.com/developerworks/mydeveloperworks/blogs/bobleah/resource/dw-small.png" />
Tips and Tricks

- Use care in where you place your brand image on the QR code image, there are required areas within the QR code that you cannot cover up.
- Use a URL shortening service - keep your payload as small as possible.
- The higher you set the CHLD parm, the larger your brand image can be.
- Use transparent backgrounds for irregularly shaped images.
- Rigorously test your new QR code image with different smart phones and bar-code readers. All phones and readers are not created equal!
My Results


To view an HTML example of my branded QR code images... click here.