qrtools icon indicating copy to clipboard operation
qrtools copied to clipboard

overload the decode function with param of file buff

Open zeroleo12345 opened this issue 8 years ago • 1 comments

nowadays the function "decode" only with param of filename, Please consider overload the decode function with the param of raw buff.

zeroleo12345 avatar Mar 10 '17 15:03 zeroleo12345

@zeroleo12345 use io.BytesIO() from io

ie, saving with PILLOW to the io object

our_image = io.BytesIO()

im.save(our_image, format="PNG")

qr = qrtools.QR()
qr.decode(our_image)
print qr.data

VeNoMouS avatar Jun 26 '18 23:06 VeNoMouS