willglynn / ruby-zbar

Ruby bindings for the ZBar barcode recognition library
MIT License
83 stars 24 forks source link

Implementing #6

Closed Figgy15 closed 10 years ago

Figgy15 commented 10 years ago

Hello...

Great library here. Glad you were able to make something like this that can be implemented with Rails. I was hoping you could help me with an issue I"m having. I installed the gem file into my project and have installed the C Library on my mac. Question is where to I implement the code? IN my Gemfile I have gem 'zbar'. :require => 'zbar'. Now where would be a good place to implement the rest of the code ->

ZBar::Image.from_jpeg(File.read('test.jpg')).process => [#<Zbar::Symbol:0x10147c668 @addon="", @data="9876543210128", @location= [...], @quality=15, @symbology="EAN-13">]

Any help would be greatly appreciated. I'm a newbie to Rails lol.

willglynn commented 10 years ago

Well, you need to get images into the Rails app somehow. I'm not sure what you're trying to accomplish exactly, but probably you'll want something like Paperclip or some other file uploading tool. Once you've got an image available to your application, ZBar can scan it for barcodes.