Sujet : Re: az - Telefax/OCR Test
De : pollux (at) *nospam* tilde.club (Stefan Claas)
Groupes : sci.cryptDate : 04. May 2024, 14:09:12
Autres entêtes
Organisation : i2pn2 (i2pn.org)
Message-ID : <v15c1p$1oa1$1@i2pn2.org>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Stefan Claas wrote:
While I still cannot decode the video, I have now my own
solution.
Here is the Python3 code:
import qrcode
import os
import argparse
import shutil
from pyzbar.pyzbar import decode
from PIL import Image
import base64
parser = argparse.ArgumentParser()
parser.add_argument('-f', '--file', help='File to convert to/from QR codes')
parser.add_argument('-e', '--encode', help='Directory to save QR codes', default=None)
parser.add_argument('-d', '--decode', help='Directory to load QR codes from', default=None)
args = parser.parse_args()
def file_to_qrcodes(file_path, directory):
with open(file_path, 'rb') as f:
counter = 0
Set counter to 1 for my following bash script[1].
ffmpeg -i "$FOLDERFILENAME" -start_number 0 "$DIRNAME/qr%d.png"
and remove -start_number 0
[1] <
https://github.com/stefanclaas/QR-Code-Helpers/blob/main/qr2page.sh>
which allows you to print QR-Codes, nicely formatted, on paper, like
Herbert has shown in his example.
-- RegardsStefan