Skip to content

jgdavey/qrdecoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QRDecoder is a ruby C extension that wraps libzxing. libzxing is a C++ port of the ZXing java library.

DEPENDENCIES

This project has the following dependencies:

  • libzxing (see the installation instruction)

  • ImageMagick with Magick++, MagickWand, MagickCore

  • libiconv [Preinstalled for OSX]

INSTALLATION

Mac OSX

NOTE: If you’re using homebrew, the current formula does NOT include Magick++.

Install the ‘ImageMagick’ library using homebrew:

brew install imagemagick --with-magick-plus-plus

Install the ‘libzxing’ library using homebrew:

brew install libzxing

Install the gem, or add it to your Gemfile

gem install qrdecoder
# OR
gem "qrdecoder", "~>0.1.0"

Linux

Install the “ImageMagick” library with the following:

Debian/Ubuntu:

sudo apt-get install libmagick++-dev

Download and build libzxing from source.

USAGE

To use, simply:

require 'qrdecoder'

QRDecoder.decode("path/to/image.jpg")

DEVELOPMENT AND CONTRIBUTING

This project uses Bundler and its own gemspec for dependency management. To get started, just clone the repo and run:

gem install bundler
bundle install
rake

The default Rake task will compile the C component and run the specs. If it fails to build, make sure that you have libzxing and ImageMagick with Magick++ installed properly.

Please send pull requests. Topic branches are preferred. New features will not be accepted without corresponding tests.

CONTRIBUTORS

  • Joshua Davey (jgdavey)

  • Dave Lyon (davelyon)

ATTRIBUTION

ZXing (pronounced “zebra crossing”) is an open-source, multi-format 1D/2D barcode image processing library implemented in Java. Information regarding contributions and other ports available on the project hompage.

ZXing is licensed under the Apache License, Version 2.0.

LICENSE

The MIT License (MIT)

Copyright © 2011 Joshua Davey, Dave Lyon

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

A ruby wrapper for the C++ port of ZXing

Resources

Stars

Watchers

Forks

Packages

No packages published