Coder Social home page Coder Social logo

pngqr's Introduction

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 <[email protected]>
Andys^ on irc.freenode.net
@andy_snow on the twitter

pngqr's People

Contributors

andys avatar

Stargazers

 avatar Mike English avatar Max Schoening avatar Chris Basham avatar Björn Blomqvist avatar  avatar Swiss Life Select Switzerland avatar Gregarious Narain avatar Sean Brewer avatar Robert Whitney avatar Paul Cowles avatar Kenneth Kalmer avatar Robin Curry avatar Yaroslav Markin avatar Bill Marquette avatar Shenouda Bertel avatar

Watchers

 avatar Florian Bräuer avatar James Cloos avatar Yared Getachew avatar

Forkers

robincurry seabre

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.