ZBar Bar Code Reader is an open source software suite for reading bar codes from various sources, such as video streams, image files and raw intensity sensors. It supports EAN-13/UPC-A, UPC-E, EAN-8, Code 128, Code 93, Code 39, Codabar, Interleaved 2 of 5, QR Code and SQ Code.
Included with the library are basic applications for decoding captured bar code images and using a video device (eg, webcam) as a bar code scanner. For application developers, language bindings are included for C, C++, Python 2 and Perl as well as GUI widgets for Qt, GTK and PyGTK 2.0.
Zbar also supports sending the scanned codes via dbus, allowing its integration with other applications.
Check the ZBar home page for the latest release, mailing lists, etc.:
Tarballs with ZBar can be obtained from:
Since ZBar version 0.23.90, binaries auto-generated from Github's Actions workflows are auto-generated for each release:
They contain binaries for:
- Ubuntu SID, generated via pbuilder;
- Mac OS;
- Windows, for 4 different configurations:
- 32 bits/64 bits;
- Video for Windows (VfW) or DirectShow (DShow).
License information can be found in COPYING
.
You may find some outdated documentation at the original ZBar's site at Sourceforge, but please notice that the content there is not updated for ages: http://zbar.sourceforge.net/
See INSTALL.md
for generic configuration and build instructions.
Please notice that at least autotools related packages and a C compiler are needed, in order to generate the configure script.
So, on Debian, at least those packages are needed: autoconf autopoint pkg-config libtool gcc make
If you have installed all needed dependencies, all you need to do is to run:
autoreconf -vfi
./configure
make
-
NOTES
-
Currently, we maintain a Continuous Integration build test at TravisCI:
https://travis-ci.org/github/mchehab/zbar/
Due to that, there are scripts meant to test ZBar build on Linux, Windows and MacOS, that could be helpful. Please see the
.travis.yml
file, and the corresponding scripts undertravis/
. -
On version 0.23, since the support for gtk3 and python3 are new, the default is to use gtk2 and python2.
If you want to use gtk3 and python3, you should have the development packages for them, and run:
-
autoreconf -vfi
./configure --with-gtk=auto --with-python=auto
make
This will make the building system to seek for the latest versions for gtk and python.
The scanner/decoder library itself only requires a few standard library functions which should be available almost anywhere.
The zbarcam program uses the video4linux API (v4l1 or v4l2) to access the video device. This interface is part of the linux kernel, a 3.16 kernel or upper is recommended for full support. More information is available at:
pkg-config
is used to locate installed libraries. You should have
installed pkg-config
if you need any of the remaining components.
pkg-config may be obtained from:
The zbarimg
program uses ImageMagick
to read image files in many
different formats. You will need at least ImageMagick
version 6.2.6
if you want to scan image files. You may also use GraphicsMagick
package instead.
ImageMagick
may be obtained from: