ZBar.jl

Julia wrapper for ZBar
Author RexWzh
Popularity
4 Stars
Updated Last
1 Year Ago
Started In
January 2023

ZBar

Wrapper of the C library ZBar for Julia.

Stable Dev Build Status Coverage

Products

The build tarball of zbar_jll contains two products:

  • libzbar.so
  • zbarimg

This repository wraps the content of libzbar.so via Clang.jl, and provides a Julia interface for the binary product zbarimg.

Usage

Installation

using Pkg
Pkg.add("ZBar")

Examples

Pass the arguments to zbarimg:

using ZBar
res = execute(`$(zbarimg()) --help`)
println(res.stdout, '\n', res.code, '\n', res.stderr)

Or use the wrappers decodeimg and decodesingle

using ZBar, QRCoders, Test
# decode a single QR-Code
exportqrcode("hello world!", "hello.png")
@test decodesingle("hello.png") == "hello world!" # "hello world!"

# decode all QR-Codes
exportqrcode(["hello", "world"], "hello_world.gif")
@test decodeimg("hello_world.gif") == ["hello", "world"] # ["hello", "world"]

Required Packages

Used By Packages

No packages found.