Reference

class zxinglight.BarcodeType

Enumeration of barcode types supported by ZXing.

NONE = 0

Default barcode type. If used, ZXing will read all types of barcodes.

AZTEC = 1
CODABAR = 2
CODE_39 = 3
CODE_93 = 4
CODE_128 = 5
DATA_MATRIX = 6
EAN_8 = 7
EAN_13 = 8
ITF = 9
MAXICODE = 10
PDF_417 = 11
QR_CODE = 12
RSS_14 = 13
RSS_EXPANDED = 14
UPC_A = 15
UPC_E = 16
UPC_EAN_EXTENSION = 17
zxinglight.read_codes(image, barcode_type=<BarcodeType.NONE: 0>, try_harder=False, hybrid=False, multi=True)

Reads codes from a PIL Image.

Parameters:
  • image (PIL.Image.Image) – Image to read barcodes from.
  • barcode_type (zxinglight.BarcodeType) – Barcode type to look for.
  • try_harder (bool) – Spend more time trying to find a barcode.
  • hybrid (bool) – Use Hybrid Binarizer instead of Global Binarizer. For more information, see ZXing’s documentation.
  • multi (bool) – Search for multiple barcodes in a single image.
Returns:

A list of barcode values.