1ZBARIMG(1)                    ZBar Barcode Reader                   ZBARIMG(1)
2
3
4

NAME

6       zbarimg - scan and decode bar codes from image file(s)
7

SYNOPSIS

9       zbarimg [-qv] [--quiet] [--verbose[=n]]
10               {-dD | --display | --nodisplay | --xml | --noxml |
11               -S[symbology.]config[=value] | --set [symbology.]config[=value]
12               | image...}
13
14       zbarimg {-h | --help | --version}
15

DESCRIPTION

17       For each specified image file zbarimg scans the image for bar codes and
18       prints any decoded data to stdout. Images may optionally be displayed
19       to the screen.
20
21       The underlying library currently supports EAN-13 (including UPC and
22       ISBN subsets), EAN-8, DataBar, DataBar Expanded, Code 128, Code 93,
23       Code 39, Codabar, Interleaved 2 of 5 and QR Code symbologies. The
24       specific type of each detected symbol is printed with the decoded data.
25
26       Note that "image" in this context refers to any format supported by
27       ImageMagick, including many vector formats such as PDF and PostScript.
28       Keep in mind that vector formats are rasterized before scanning;
29       manually rasterize vector images before scanning to avoid
30       unintentionally corrupting embedded barcode bitmaps.
31

OPTIONS

33       This program follows the usual GNU command line syntax. Single letter
34       options may be bundled, long options start with two dashes (`-').
35
36       -h, --help
37           Print a short help message describing command line options to
38           standard output and exit
39
40       --version
41           Print program version information to standard output and exit
42
43       -v, --verbose[=n]
44           Increase debug output level. Multiple -v options create more spew.
45           Alternatively specify n to set the debug level directly
46
47       -S[symbology.]config[=value], --set [symbology.]config[=value]
48           Set decoder configuration option config for symbology to value.
49           value defaults to 1 if omitted.  symbology is one of ean13, ean8,
50           upca, upce, isbn13, isbn10, i25, codabar, code39, code93, code128,
51           qrcode or the special value *. If symbology is omitted or *, the
52           config will be set for all applicable symbologies. These are the
53           currently recognized configs. Prefix a config with "no-" to negate
54           it. Not all configs are appropriate for every symbology.
55
56           enable
57               Control decoding/reporting of a symbology. For symbologies
58               which are just subsets of ean13 (upca, upce, isbn13, isbn10),
59               this config controls whether the subsets are detected and
60               reported as such. These special cases are disabled by default,
61               all other symbologies default to enabled
62
63           disable
64               Antonym for enable
65
66           emit-check
67               Control whether check digits are included in the decoded
68               output. Enabled by default. This config does not apply for
69               code128, which never returns the check digit. It also not apply
70               for cases where the check digit is disabled (see add-check).
71               Check digits are currently not implemented for i25 or code39
72
73           add-check
74               Enable decode and verification of a check digit for symbologies
75               where it is optional: this will include code39 and i25, neither
76               of which implements the check digit yet
77
78           ascii
79               Enable escape sequences that encode the full ASCII character
80               set. This would apply to code39, except that it's not
81               implemented either...
82
83           position
84               Enable collection of symbol position information. Enabled by
85               default. Currently, the position information is unusable, so
86               you can save a few cycles by disabling this.
87
88           test-inverted
89               Specially for QR code images, sometimes the image is inverted,
90               e. g. lines are written in white instead of black. This option
91               makes ZBar to invert the image and parse again, in case it
92               fails using the normal order. Enabling it affects all decoders.
93
94           min-length=n, max-length=n
95               Bound the number of decoded characters in a valid symbol. If a
96               decode result is outside the configured min/max range
97               (inclusive), it will not be reported. Set to 0 to disable the
98               corresponding check. This setting applies to variable-length
99               symbologies: i25, codabar, code39, code128 and pdf417.
100               min-length defaults to 6 for i25 and 1 for code39 (per Code 39
101               autodiscrimination recommendation); all others default to 0
102
103           x-density=n, y-density=n
104               Adjust the density of the scanner passes. Lower values scan
105               more of the image at the cost of decreased performance. Setting
106               to 0 disables scanning along that axis. Defaults are both 1.
107
108       -q, --quiet
109           Quiet operation; only output decoded symbol data. specifically this
110           disables the statistics line printed (to stderr) before exiting, as
111           well as the warning message printed (also to stderr) when no
112           barcodes are found in an image
113
114       -d, --display, -D, --nodisplay
115           Enable/disable display of subsequent image files, until next
116           --display or --nodisplay is encountered. This option may appear
117           multiple times to enable display of specific images. Image display
118           is disabled by default
119
120       --xml, --noxml
121           Enable/disable result output using an XML format. This format wraps
122           the raw data from the symbol with information about the scan (such
123           as page indices) in an easy to parse format. The latest schema is
124           available from http://zbar.sourceforge.net/2008/barcode.xsd.
125
126       --raw
127           Enable raw symbol data output. This format prints symbol data
128           separated by newlines without the additional symbology type
129           information that is printed by default
130

EXAMPLES

132       Scan a PNG image of a UPC bar code symbol and pass resulting data to a
133       script that searches for the code in a database and does something
134       useful with it:
135
136           zbarimg product.png | upcrpc.py
137
138       The upcrpc.py example script included in the examples/ subdirectory of
139       the distribution will make an XMLRPC call to a popular internet UPC
140       database and print the product description if found.
141
142       Scan a JPEG image containing several barcodes and display the image in
143       a window, also disabling recognition of Interleaved 2 of 5 codes to
144       prevent confusion with other symbologies or background noise:
145
146           zbarimg --display -Si25.disable label.jpg
147
148       Look in a scanned document only for Code 39, using XML output format so
149       the page numbers are available. To enable only Code 39, first all
150       symbologies are disabled, then Code 39 is re-enabled:
151
152           zbarimg --xml -Sdisable -Scode39.enable scan.tiff
153
154

EXIT STATUS

156       zbarimg returns an exit code to indicate the status of the program
157       execution. Current exit codes are:
158
159       0
160           Barcodes successfully detected in all images. Warnings may have
161           been generated, but no errors.
162
163       1
164           An error occurred while processing some image(s). This includes bad
165           arguments, I/O errors and image handling errors from ImageMagick.
166
167       2
168           ImageMagick fatal error.
169
170       3
171           The user quit the program before all images were scanned. Only
172           applies when running in interactive mode (with --display)
173
174       4
175           No barcode was detected in one or more of the images. No other
176           errors occurred.
177

SEE ALSO

179       zbarcam(1)
180
181       http://zbar.sf.net/
182

BUGS

184       See http://sf.net/tracker/?group_id=189236&atid=928515
185

AUTHOR

187       Jeff Brown <spadix@users.sourceforge.net>
188           Lead developer
189
191       Copyright © 2007-2010 Jeff Brown
192
193       All Rights Reserved
194
195
196
197
198zbar-0.22                         2017-04-11                        ZBARIMG(1)
Impressum