Thursday, December 13, 2012

Generating QR codes quick and easy in Windows 8

You all probably seen QR codes before, these strange looking images containing any kind of data. Most of the times there are used to embed an URL but you can put any kind of data in it

For a Windows 8 application I’m building I wanted to embed the option to generate QR codes and share these codes using the Windows 8 Share Contracts. The easiest way I found to generate QR codes is by using the Google Chart API. The only thing you need to do is specify the size in pixels of your barcode and the url you wish to encode.

If you invoke a GET request to the Google Chart API using the following query string, you’ll get a generated QR image back:

Nice and simple!

No comments: