Search code examples
rubybarcodezxing

Xzing recognizes Barcode only in Java version


I'm trying to bulk scan some jpg files with barcodes on them. I've used the ruby bindings for the c++ port of xzing. When I have this file:

barcode scanned by the Web-Version of Xzing (https://zxing.org/w/decode.jspx) everything turns out fine. When I try to scan this one in ruby (using https://github.com/glassechidna/zxing_cpp.rb) nothing is recognized. I already tried cranking up the contrast, but it did not help. It's not my ruby setup because it works for loads of other nearly identical codes. The only thing I can think of is any difference between the Java version and the C++ port, but this is absolute poking in the dark, I've started using zxing just today. Could anyone get this code recognized in ruby? Thank you very much.


Solution

  • The gem you're using and/or it's dependencies our out of date. If you want to still use Ruby for your project, you can try using one of the online services in the comments for the decoding. You could either try to use the mechanize gem or roll your own using other http ruby tools such as httparty or Ruby's Net::HTTP