V
V
vladimir_monomarch2019-02-13 09:35:17
Django
vladimir_monomarch, 2019-02-13 09:35:17

How to read QR code via web app?

There is a web application written in python and django. How to use them to read a QR code image through a camera (smartphone, computer) and decrypt it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2019-02-13
@vladimir_monomarch

It will be necessary to develop a mobile application or javascript code that will take a picture through the camera and send it to the server. And on the server in python code, you can use a library like pyzbar to decrypt:

from PIL import Image
from pyzbar.pyzbar import decode

img = Image.open('path/to/image.png')
for qr in decode(img):
    data = qr.data
    ...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question