python識別二維碼內容

from pyzbar.pyzbar import decode
from PIL import Image
image = 'xx.png'
img = Image.open(image)
barcodes = decode(img)
for barcode in barcodes:
    url = barcode.data.decode("utf-8")
    print(url)
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章