Reference
- zbarlight.copy_image_on_background(image: Image, color: tuple[int, int, int] = (255, 255, 255)) Image
Create a new image by copying the image on a color background.
- Parameters:
image (PIL.Image.Image) – Image to copy
color (tuple) – Background color usually WHITE or BLACK
- Returns:
PIL.Image.Image
- zbarlight.scan_codes(code_types: str | list[str], image: Image) list[bytes] | None
Get code_type codes from a PIL Image.
code_type can be any of zbar supported code type [1]:
EAN/UPC: EAN-13 (ean13), UPC-A (upca), EAN-8 (ean8) and UPC-E (upce)
Linear barcode: Code 128 (code128), Code 93 (code93), Code 39 (code39), Interleaved 2 of 5 (i25), DataBar (databar) and DataBar Expanded (databar-exp)
2D: QR Code (qrcode)
Undocumented: ean5, ean2, composite, isbn13, isbn10, codabar, pdf417
- Parameters:
code_types (list(str)) – Code type(s) to search (see
zbarlight.Symbologiesfor supported values).image (PIL.Image.Image) – Image to scan
- Returns:
A list of code_type code values or None