Giter Club home page Giter Club logo

Comments (6)

willglynn avatar willglynn commented on July 17, 2024

The underlying zbar library supports configuration values. This isn't currently plumbed into the zbar gem, but I could add that without too much effort. The API currently allows you to check the symbology of the resulting ZBar::Symbol objects:

symbols = image.process
qrcodes = symbols.select { |symbol| symbol.symbology == "qrcode" }

from ruby-zbar.

philister avatar philister commented on July 17, 2024

Thank you for this explanation.
Currently I "filter" the symbology afterwards (after process). But I bet, the search would be faster, if it had to search for a specific symbology. You know what I mean?
Would be great to have this feature, because at least in my case, I know, what symbology I'm looking for.

from ruby-zbar.

willglynn avatar willglynn commented on July 17, 2024

All right, I'll take a whack at this :-)

Would you happen to have an image containing barcodes with more than one symbology that you'd like to contribute to the test suite?

from ruby-zbar.

willglynn avatar willglynn commented on July 17, 2024

As of the current master:

> ZBar::Image.from_jpeg(File.open("spec/support/test.jpg", "rb")).process(:symbology => "qrcode")
 => [] 
> ZBar::Image.from_jpeg(File.open("spec/support/test.jpg", "rb")).process(:symbology => "ean13")
 => [#<ZBar::Symbol:... @symbology="EAN-13", @data="9876543210128", ...>] 

I want to do a couple other things first, but this will be released as 0.2.0.

from ruby-zbar.

willglynn avatar willglynn commented on July 17, 2024

zbar-0.2.0 has been released, containing this functionality, a rewritten test suite, Travis CI, as well as a runtime check for the zbar JPEG issue behind #2.

from ruby-zbar.

philister avatar philister commented on July 17, 2024

Wow, awesome! Thank you a lot. It works well und improves the performance of my code-detection significantly.

from ruby-zbar.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.