Created
August 26, 2012 10:45
-
-
Save gouf/3477286 to your computer and use it in GitHub Desktop.
QR Code generate test.(using Barby)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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