Wrapper of the C library ZBar for Julia.
The build tarball of zbar_jll contains two products:
libzbar.sozbarimg
This repository wraps the content of libzbar.so via Clang.jl, and provides a Julia interface for the binary product zbarimg.
using Pkg
Pkg.add("ZBar")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"]