← 返回命令列表

Linux command

zbarimg 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Scan image for barcodes

zbarimg [image.png]

Scan multiple images

zbarimg [image1.png] [image2.jpg]

Output raw data only

zbarimg --raw [image.png]

Scan only QR codes

zbarimg -Sdisable -Sqrcode.enable [image.png]

Quiet mode

zbarimg -q [image.png]

Display image with detected barcodes highlighted

zbarimg -d [image.png]

XML output

zbarimg --xml [image.png]

Output polygon points of detected barcodes

zbarimg --polygon [image.png]

说明

zbarimg reads barcodes from image files. It detects and decodes various barcode formats including QR codes. Multiple barcode types are detected automatically. Settings can disable specific types for faster scanning. Output shows barcode type and decoded data. Raw mode outputs only the data without type prefixes. Multiple barcodes in one image are all detected. Each is reported on a separate line. The display option shows images with detected barcodes highlighted. This helps verify correct detection. Image formats supported include PNG, JPEG, and any format supported by ImageMagick.

参数

--raw
Output raw symbol data without symbology type prefix.
-q, --quiet
Quiet operation; only output decoded symbol data. Suppresses the statistics line and no-barcode warnings on stderr.
-d, --display
Enable display of images with decoded symbols highlighted.
-D, --nodisplay
Disable image display.
--xml, --noxml
Enable or disable XML output format wrapping decoded data with scan metadata.
--polygon
Output polygon points of the barcode boundary in SVG format.
-S _symbology.config=value_
Set decoder configuration. Symbologies include: ean13, ean8, upca, upce, isbn13, isbn10, i25, codabar, code39, code93, code128, qrcode, or * for all.
-v, --verbose=_n_
Increase debug output level. Use multiple -v for more detail, or specify n directly.
--help
Show help.
--version
Show version.

FAQ

What is the zbarimg command used for?

zbarimg reads barcodes from image files. It detects and decodes various barcode formats including QR codes. Multiple barcode types are detected automatically. Settings can disable specific types for faster scanning. Output shows barcode type and decoded data. Raw mode outputs only the data without type prefixes. Multiple barcodes in one image are all detected. Each is reported on a separate line. The display option shows images with detected barcodes highlighted. This helps verify correct detection. Image formats supported include PNG, JPEG, and any format supported by ImageMagick.

How do I run a basic zbarimg example?

Run `zbarimg [image.png]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --raw do in zbarimg?

Output raw symbol data without symbology type prefix.