Skip to content

Instantly share code, notes, and snippets.

@gouf
Created August 26, 2012 10:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save gouf/3477286 to your computer and use it in GitHub Desktop.
Save gouf/3477286 to your computer and use it in GitHub Desktop.
QR Code generate test.(using Barby)
require 'barby'
require 'barby/barcode'
require 'barby/barcode/qr_code'
require 'barby/outputter/png_outputter'
str = 'Hello QrCode!! Using Gem for Barby, Barby-pngOutputter and Chunky-PNG.'
b = Barby::QrCode.new(str, level: :q, size: 10)
File.open('qr.png', 'w') do |f|
f.write b.to_png
f.close
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment