Skip to content

Instantly share code, notes, and snippets.

@t-kashima
Created March 25, 2015 06:43
Show Gist options
  • Save t-kashima/65871bbf67b949ea4539 to your computer and use it in GitHub Desktop.
Save t-kashima/65871bbf67b949ea4539 to your computer and use it in GitHub Desktop.
QRCode for Ruby
# -*- encoding: utf-8 -*-
require 'rqrcode'
require 'rqrcode_png'
require 'chunky_png'
qr = RQRCode::QRCode.new('Hello, world', :size => 3, :level => :h)
png = qr.to_img
png.resize(200, 200).save('qrcode.png')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment