master
d42 2020-03-06 20:26:51 +01:00
parent 237c257a68
commit e9bedc9cde
1 changed files with 1 additions and 3 deletions

View File

@ -97,7 +97,6 @@ def make_qr(url, size=19):
q.add_data(url)
q.make()
img = q.make_image(image_factory=QRCairo)
img.save('ebinqr.png')
return img
@ -105,12 +104,11 @@ def make_label(text, url, dpi=DPI):
qr = make_qr(url)
dpm = dpi*INCH_PER_MM
img = Image(51*dpm, 19*dpm, (1, 1, 1))
img.draw_text('lorem ipsum', 19.5*dpm, 0)
img.draw_text(text, 19.5*dpm, 0)
qr_img = qr._img
img.compose(qr_img, 0, 0, int(19*dpm), int(19*dpm))
return img
io = BytesIO()
# with open('papiez.png', 'w') as f:
make_label('ebin xD', 'http://www.wykop.pl/').save('output.png')