Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pngqr

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pngqr

  • 0.6
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

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

FAQs

Package last updated on 16 Feb 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc