43
44
def encode(self, text, output_type=QRCodeOutput.PIL_IMAGE):
44
45
'''Encodes the given text and returns a QR code in the given format'''
46
47
if output_type == QRCodeOutput.PIL_IMAGE:
47
48
qr_code = self._encode_to_pil(text)
48
49
elif output_type == QRCodeOutput.CAIRO_SURFACE: