Comments (6)
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.
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.
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.
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.
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.
Wow, awesome! Thank you a lot. It works well und improves the performance of my code-detection significantly.
from ruby-zbar.
Related Issues (13)
- Ruby 1.9 v 1.8? HOT 2
- JPEG datastream contains no image HOT 24
- LoadError: no library specified HOT 2
- Cannot process jpeg image HOT 4
- Implementing HOT 1
- Decoding PNG images HOT 15
- Q:Heroku Zbar Didn't find libzbar on your system (LoadError) HOT 23
- Wouldn't read a valid PGM file HOT 2
- Can't read code with some noise. iOS app using zbar scans it fine. HOT 3
- ruby-zbar with EPEL zbar doesn't work correctly on CentOS7. HOT 1
- from_jpeg - Segmentation fault at 0x0000000000000000 HOT 1
- ZBAR ON MAC BROKEN? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ruby-zbar.