Blank Image when using rmagick_outputter with 2d barcodes

106 views
Skip to first unread message

Andrew Narkewicz

unread,
Jul 6, 2010, 5:22:37 PM7/6/10
to Barby
Hello,
I am trying to use the rmagick_outputter with qrcode barcode types and
it always outputs a blank image whether I use to_image or to_png.
Can anyone please help me,
Thanks

Tore Darell

unread,
Jul 6, 2010, 5:34:47 PM7/6/10
to Barby
Can you post your code?

Andrew Narkewicz

unread,
Jul 7, 2010, 11:47:54 AM7/7/10
to Barby
the_barcode = Barby::QrCode.new(self.barcode)

puts the_barcode.to_ascii
#prints table of x's to log
the_barcode = the_barcode.to_image

the_barcode.display
#BLANK IMAGE SAME RESULT WHEN USING to_png instead of to_image above

Thanks for any help

Andrew Narkewicz

unread,
Jul 7, 2010, 11:49:30 AM7/7/10
to Barby
self.barcode = 'wHlnAIOsZwtI'

Tore Darell

unread,
Jul 10, 2010, 1:57:49 PM7/10/10
to Barby
Which OS, and which version of RMagick/ImageMagick?

If you want a quick solution, you can use the PngOutputter to create
PNGs too.

fruti saritha

unread,
Jun 2, 2012, 2:12:16 AM6/2/12
to ruby-...@googlegroups.com
Try this it's working  perfectly  :

# Gemfile, run bundle install after adding
gem 'barby'
gem 'chunky_png'

# some code to generate the png file using 3 of 9 barcode style
require 'barby'
require 'barby/barcode/code_128'
require 'barby/outputter/png_outputter'
barcode = Barby::Code128B.new('xxxx')
File.open('exleaz1s.svg', 'wb'){|f|
  f.write barcode.to_svg
}
Reply all
Reply to author
Forward
0 new messages