Pure Ruby Gem to generate PNG files of QR codes.
require 'pngqr' . 'https://github.com/andys', :file => 'output.png'
The parameters for encode() are the same as the rqrcode gem's new(), except:
we add :file if you want to output to a file instead of returning the PNG as
a blob, and
you can :scale with an integer parameter and it will scale up the output
image by that many times.
if you don't supply a :size, we auto-size by testing each size until we
find the one that worked. It seems quick enough.
:border=>n lets you add an n pixel white border to the PNG
Gems: rqrcode and chunky_png (both pure ruby gems)
Contact the author
Andrew Snow <[email protected]> Andys^ on irc.freenode.net @andy_snow on the twitter