Skip to content

how to take bytes as input instead of image path? #23

@CRonaldo1997

Description

@CRonaldo1997

As described in the README, reader.decode() takes image path as parameter:
reader = zxing.BarCodeReader("/var/opt/zxing")
barcode = reader.decode("/tmp/image.jpg")

How to take bytes instead of image path? For example:
with open('/tmp/image.jpg','rb') as img_file:
img_bytes = img_file.read()
barcode = reader.decode(img_bytes)

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions