mirror of
https://github.com/status-im/QR-Code-generator.git
synced 2026-08-31 01:31:10 +00:00
Synchronized example Python code in setup.py with main readme (related to commit 7e72bd8dfb).
This commit is contained in:
+3
-5
@@ -97,11 +97,9 @@ Examples:
|
||||
# Manual operation
|
||||
segs = QrSegment.make_segments("3141592653589793238462643383")
|
||||
qr1 = QrCode.encode_segments(segs, QrCode.Ecc.HIGH, 5, 5, 2, False)
|
||||
border = 4
|
||||
for y in range(-border, qr1.get_size() + border):
|
||||
for x in range(-border, qr1.get_size() + border):
|
||||
color = qr1.get_module(x, y) # False for white, True for black
|
||||
# (... paint the module onto pixels ...)
|
||||
for y in range(qr1.get_size()):
|
||||
for x in range(qr1.get_size()):
|
||||
(... paint qr1.get_module(x, y) ...)
|
||||
|
||||
More complete set of examples: https://github.com/nayuki/QR-Code-generator/blob/master/python/qrcodegen-demo.py .
|
||||
|
||||
|
||||
Reference in New Issue
Block a user