This is what I have so far... can't figure out how to read image from buffer vs file?
import pyqrcode
import io
from cv2 import cv2
qr = pyqrcode.create("Hello")
buffer = io.BytesIO()
qr.svg(buffer)
# image = cv2.imread(path) // How to read image from buffer instead?
cv2.imshow('Image', image)
cv2.waitKey(0)
cv2.destroyAllWindows()
pyqrcodeto output a PNG (of which it is capable), or usepyvipsorwandto read the SVG. If anyone knows better I am always happy to be corrected.qr.png(buffer)usingcv2?cv2.imdecode(np.array(buffer.getcontents()), cv2.IMREAD_COLOR))I'm not at a computer to test. You basically need to runcv2.imdecode()on something that looks like bytes or a Numpy array and starts with a PNG signature\x89PNG