[ANN] Barby 0.2.0

Barby 0.2.0 has been released.

http://tore.darell.no/posts/barby_0_2
http://barby.rubyforge.org/

Below is a copy of the announcement from my blog.

Barby 0.2 has support for two-dimensional barcodes, and all existing
outputters have been updated to work with 2D. The first supported 2D
symbology is "QR Code":http://en.wikipedia.org/wiki/QR_Code which is
quite popular for mobile phone implementations and big in Japan. It
uses the excellent "RQRCode":http://rqrcode.rubyforge.org/ library by
"Duncan Robertson":http://whomwah.com/2008/02/24/rqrcode-a-ruby-
library-for-encoding-qr-codes.

require 'barby'
require 'barby/outputter/png_outputter'

qrcode = Barby::QrCode.new('2D power')

File.open('qrcode.png', 'w') do |f|
  f << qrcode.to_png
end

To update or install:

sudo gem install barby

The implementation of 2D support is pretty simple: 2D barcodes are
considered to be 1D barcodes on top of each other. So if you're
writing a class for a 2D symbology, the difference is that your
@encoding@ method must return an array of strings instead if a single
string:

class My2DBarcode < Barby::Barcode2D

  def endoding
    ['010011', '011001', '110001']
  end

end

If you're writing an outputter that is capable of handling 2D
barcodes, you just have to keep this in mind. You can use the
@two_dimensional?@ method to check if a barcode is 2D:

class MyOutputter < Barby::Outputter

  def to_something
    if barcode.two_dimensional?
      encoding.inject(""){|s,line| s + do_something_with(line) }
    else
      do_something_with(encoding)
    end
  end

end

hi,
are you planning to support pdf417[1]? if so, maybe I can give you a hand, since I'm already needing something like that.

[1] PDF417 - Wikipedia

regards,

···

On 16-07-2008, at 15:15, Tore Darell wrote:

Barby 0.2.0 has been released.

http://tore.darell.no/posts/barby_0_2
http://barby.rubyforge.org/

Below is a copy of the announcement from my blog.

--
Rolando Abarca M.

Hi Rolando,

Yes, the plan is to support as many symbologies as possible, but it's
proven much more difficult to find decent specs for any of the 2D
barcodes than I thought it would be.. If you want to help with PDF417,
that'd be great.

Tore

···

On Jul 16, 10:14 pm, Rolando Abarca <funkas...@gmail.com> wrote:

hi,
are you planning to support pdf417[1]? if so, maybe I can give you a
hand, since I'm already needing something like that.