def qr ( self , text ) : qr_code = qrcode . QRCode ( version = 4 , box_size = 4 , border = 1 ) qr_code . add_data ( text ) qr_code . make ( fit = True ) qr_img = qr_code . make_image ( ) im = qr_img . _img . convert ( "RGB" ) # Convert the RGB image in printable image self . _convert_image ( im )
python multiple qr codes from one image
Print QR Code for the provided string
def qr(self,text):
        """ Print QR Code for the provided string """
        qr_code = qrcode.QRCode(version=4, box_size=4, border=1)
        qr_code.add_data(text)
        qr_code.make(fit=True)
        qr_img = qr_code.make_image()
        im = qr_img._img.convert("RGB")
        # Convert the RGB image in printable image
        self._convert_image(im)