Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Pure Ruby Gem to generate PNG files of QR codes
Ruby
branch: master

This branch is 2 commits behind seabre:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
test
CHANGELOG
Manifest
README
Rakefile
pngqr.gemspec

README

PNGQR (Ping-queer?)
-------------------

Pure Ruby Gem to generate PNG files of QR codes.



Usage
-----

Example:

  require 'pngqr'

  Pngqr.encode 'https://github.com/andys', :file => 'output.png'

The parameters for encode() are the same as the rqrcode gem's new(), except:

1. we add :file if you want to output to a file instead of returning the PNG as
a blob, and

2. you can :scale with an integer parameter and it will scale up the output
image by that many times.

3. 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.

4. :border=>n lets you add an n pixel white border to the PNG


Dependencies
------------

Gems: rqrcode and chunky_png (both pure ruby gems)

See: http://whomwah.github.com/rqrcode/




Contact the author
------------------

Andrew Snow <andrew@modulus.org>
Andys^ on irc.freenode.net
@andy_snow on the twitter
Something went wrong with that request. Please try again.