This commit is contained in:
parent
21eda652f5
commit
dc02c9bcf9
1 changed files with 1 additions and 1 deletions
|
@ -58,7 +58,7 @@ def export(plan: Dict, img: Image.Image, theme: str = "light") -> Image.Image:
|
|||
|
||||
def decode(img: Image.Image) -> Optional[Dict]:
|
||||
img = img.convert("RGB")
|
||||
if img.getpixel((0, 0)) == BLACK:
|
||||
if img.getpixel((0, 0))[0] < 127:
|
||||
img = ImageChops.invert(img)
|
||||
result = []
|
||||
while len(data := pyzbar.decode(img)):
|
||||
|
|
Loading…
Reference in a new issue