https://github.com/elixir-vision/zbar
Basic wrapper around a zbar barcode-scanning library
https://github.com/elixir-vision/zbar
barcodes elixir hacktoberfest nerves-project zbar
Last synced: about 2 months ago
JSON representation
Basic wrapper around a zbar barcode-scanning library
- Host: GitHub
- URL: https://github.com/elixir-vision/zbar
- Owner: elixir-vision
- License: mit
- Created: 2018-01-13T21:57:12.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-08-20T20:19:41.000Z (over 2 years ago)
- Last Synced: 2024-09-16T19:10:44.480Z (over 1 year ago)
- Topics: barcodes, elixir, hacktoberfest, nerves-project, zbar
- Language: C
- Homepage:
- Size: 19.5 KB
- Stars: 14
- Watchers: 2
- Forks: 7
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Zbar
Scan one or more barcodes from a JPEG image.
The API for this library is very simple:
```elixir
iex> File.read!("QR_REF1.jpg") |> Zbar.scan()
%Zbar.Symbol{
data: "REF1",
points: [{40, 40}, {40, 250}, {250, 250}, {250, 40}],
quality: 1,
type: "QR-Code"
}
```
More detailed API documentation can be found at
[https://hexdocs.pm/zbar](https://hexdocs.pm/zbar).
## Installation
This package is [available in Hex](https://hex.pm/packages/zbar) and can be
installed by adding `:zbar` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[{:zbar, "~> 0.2"}]
end
```
You will also need to have `zbar` and `libjpeg` installed in order to compile
the required native code. On OSX with Homebrew, this is as simple as:
```bash
$ brew install zbar libjpeg
```