1ZBARIMG(1) ZBar Barcode Reader ZBARIMG(1)
2
3
4
6 zbarimg - scan and decode bar codes from image file(s)
7
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
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, Interleaved 2 of 5 and QR Code symbologies. The specific type
24 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
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, code39, code93, code128, qrcode or
51 the special value *. If symbology is omitted or *, the config will
52 be set for all applicable symbologies. These are the currently
53 recognized configs. Prefix a config with "no-" to negate it. Not
54 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 min-length=n, max-length=n
89 Bound the number of decoded characters in a valid symbol. If a
90 decode result is outside the configured min/max range
91 (inclusive), it will not be reported. Set to 0 to disable the
92 corresponding check. This setting applies to variable-length
93 symbologies: i25, code39, code128 and pdf417. min-length
94 defaults to 6 for i25 and 1 for code39 (per Code 39
95 autodiscrimination recommendation); all others default to 0
96
97 x-density=n, y-density=n
98 Adjust the density of the scanner passes. Lower values scan
99 more of the image at the cost of decreased performance. Setting
100 to 0 disables scanning along that axis. Defaults are both 1.
101
102 -q, --quiet
103 Quiet operation; only output decoded symbol data. specifically this
104 disables the statistics line printed (to stderr) before exiting, as
105 well as the warning message printed (also to stderr) when no
106 barcodes are found in an image
107
108 -d, --display, -D, --nodisplay
109 Enable/disable display of subsequent image files, until next
110 --display or --nodisplay is encountered. This option may appear
111 multiple times to enable display of specific images. Image display
112 is disabled by default
113
114 --xml, --noxml
115 Enable/disable result output using an XML format. This format wraps
116 the raw data from the symbol with information about the scan (such
117 as page indices) in an easy to parse format. The latest schema is
118 available from http://zbar.sourceforge.net/2008/barcode.xsd.
119
120 --raw
121 Enable raw symbol data output. This format prints symbol data
122 separated by newlines without the additional symbology type
123 information that is printed by default
124
126 Scan a PNG image of a UPC bar code symbol and pass resulting data to a
127 script that searches for the code in a database and does something
128 useful with it:
129
130 zbarimg product.png | upcrpc.py
131
132 The upcrpc.py example script included in the examples/ subdirectory of
133 the distribution will make an XMLRPC call to a popular internet UPC
134 database and print the product description if found.
135
136 Scan a JPEG image containing several barcodes and display the image in
137 a window, also disabling recognition of Interleaved 2 of 5 codes to
138 prevent confusion with other symbologies or background noise:
139
140 zbarimg --display -Si25.disable label.jpg
141
142 Look in a scanned document only for Code 39, using XML output format so
143 the page numbers are available. To enable only Code 39, first all
144 symbologies are disabled, then Code 39 is re-enabled:
145
146 zbarimg --xml -Sdisable -Scode39.enable scan.tiff
147
148
150 zbarimg returns an exit code to indicate the status of the program
151 execution. Current exit codes are:
152
153 0
154 Barcodes successfully detected in all images. Warnings may have
155 been generated, but no errors.
156
157 1
158 An error occurred while processing some image(s). This includes bad
159 arguments, I/O errors and image handling errors from ImageMagick.
160
161 2
162 ImageMagick fatal error.
163
164 3
165 The user quit the program before all images were scanned. Only
166 applies when running in interactive mode (with --display)
167
168 4
169 No barcode was detected in one or more of the images. No other
170 errors occurred.
171
173 zbarcam(1)
174
175 http://zbar.sf.net/
176
178 See http://sf.net/tracker/?group_id=189236&atid=928515
179
181 Jeff Brown <spadix@users.sourceforge.net>
182 Lead developer
183
185 Copyright © 2007-2010 Jeff Brown
186
187 All Rights Reserved
188
189
190
191
192zbar-0.10 2009-10-23 ZBARIMG(1)