From de8eb3b793026528f2faba5a7025852077d1bc8c Mon Sep 17 00:00:00 2001 From: Isaac Lyons Date: Tue, 5 Jan 2021 17:07:35 -0700 Subject: [PATCH] Scale up QR using nearest-neighbor scaling --- MyQR/myqr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MyQR/myqr.py b/MyQR/myqr.py index 1545b16..013b3a4 100644 --- a/MyQR/myqr.py +++ b/MyQR/myqr.py @@ -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')