Skip to content

Makes it easy to generate QRCodes using rQRCode for encoding and RMagick for rendering

License

Notifications You must be signed in to change notification settings

terryfinn/qrcode_magick

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QRCode Magick

QRCodeMagick is an easy to use gem that makes generating QRCodes and rendering them to images super simple.

Usage

QRCodeMagick is very simple to use. There are two basic methods: draw and draw_image. Below is an example script that show how both methods work.

require 'rubygems'
require 'qrcode_magick'

# Generate a RMagick drawing for a qrcode
drawing = QRCodeMagick.draw 'some url'

# Generate a RMagick drawing for a qrcode with some options
drawing_with_options = QRCodeMagick.draw 'some url', :scale => 8

# Generate a RMagick image for a qrcode
image = QRCodeMagick.draw_image 'some url'

# Generate a QRCode and write it to disk
image = QRCodeMagick.draw_image 'some url', :scale => 8, :write_to => 'qrcode.png'

About

Makes it easy to generate QRCodes using rQRCode for encoding and RMagick for rendering

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages