QR Codes, the easy way

For no reason whatsoever, I was looking at QR code generation and had delved into some interesting paths, such as a recent contribution to CPAN that generates QR codes in spaces and asterisks. Not much use, perhaps, until you use those characters to feed some graphics processor and then you really can work some magic. The error-correction built into the codes permits quite a lot of intentional errors without destroying data, and one can arrange the intentional errors to form interesting pictures within the codes. ISO 18004 has all the details (if you have the money to buy the spec).

If you are interested in lower level implementation details, check out the libqrencode library (in C). This recently added Micro QR support, which is a technology worth watching.

There’s an abundance of Web sites that will offer instant QR codes for free, and which will then try to sell you mugs and T-shirts with the codes. Not a bad idea, since many people looking for QR code support are marketing personnel looking for a new way to attract visitors to their sites. No doubt the mugs, shirts, towels and other merchandise will create a nice revenue stream.

But of all the online facilities I was testing, the most simple and by far the most useful (to me, anyway) was Google’s instant embedded QR code generator. The image you see below has been generated by Google. To get the src URL, just use the following format:

http://chart.googleapis.com/chart?chs=200×200&cht=qr&chl=http://example.com/some/path

The 200×200 sets the size of the image, and the last parameter is the URL encoded data (e.g. space becomes %20). It’s that easy.

QR code example

Categorised as: Coding, Protocols & Specs, Web

Comment Free Zone

Comments are closed.