ZXingCPP
June 15, 2026 ยท View on GitHub
ZXingCPP.jl is a Julia wrapper for the C++ library zxing-cpp. It is an open-source, multi-format linear/matrix barcode image processing library implemented in C++.
ZXingCPP.jl provides fast and accurate barcode detection, decoding and creation within Julia.
ZXingCPP.jl integrated with Images.jl and OpenCV.jl. Both packages can used to read and write barcode images.
Usage
Using Images.jl
using ZXingCPP
using ImageCore
using FileIO
using ImageIO
Create:
bc = Barcode("HELLO WORLD", ZXing_BarcodeFormat_QRCode)
print(bc)
Write:
zimg = write_barcode_to_image(bc, scale=10)
jimg = Matrix(zimg)
save("barcode.png", jimg)
Read:
img = load("barcode.png")
bcs = read_barcodes(img, formats=[ZXing_BarcodeFormat_QRCode])
print(bcs)
Pluto notebook with annotation example using Images.jl found at here
Using OpenCV.jl
using ZXingCPP
using OpenCV
Create:
bc = Barcode("HELLO WORLD", ZXing_BarcodeFormat_QRCode)
print(bc)
Write:
zimg = write_barcode_to_image(bc, scale=10)
cvimg = OpenCV.Mat(zimg)
OpenCV.imwrite("barcode.png", cvimg)
Read:
img = OpenCV.imread("barcode.png", OpenCV.IMREAD_UNCHANGED)
bcs = read_barcodes(img, formats=[ZXing_BarcodeFormat_QRCode])
print(bcs)
Pluto notebook with annotation example using OpenCV.jl found at here