:3
This commit is contained in:
parent
237c257a68
commit
e9bedc9cde
1 changed files with 1 additions and 3 deletions
4
qrpoc.py
4
qrpoc.py
|
@ -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')
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue