Skip to content

Commit

Permalink
Scale up QR using nearest-neighbor scaling
Browse files Browse the repository at this point in the history
  • Loading branch information
skjiisa committed Jan 6, 2021
1 parent fe1952d commit de8eb3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion MyQR/myqr.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def combine(ver, qr_name, bg_name, colorized, contrast, brightness, save_dir, sa
qr.putpixel((i+12,j+12), bg.getpixel((i,j)))

qr_name = os.path.join(save_dir, os.path.splitext(os.path.basename(bg_name))[0] + '_qrcode.png') if not save_name else os.path.join(save_dir, save_name)
qr.resize((qr.size[0]*3, qr.size[1]*3)).save(qr_name)
qr.resize((qr.size[0]*3, qr.size[1]*3), resample=Image.NEAREST).save(qr_name)
return qr_name

tempdir = os.path.join(os.path.expanduser('~'), '.myqr')
Expand Down

0 comments on commit de8eb3b

Please sign in to comment.