Skip to content

QRCode class not resizing down between runs #392

@K9-guardian

Description

@K9-guardian

Test:

#!/usr/bin/env python3
import qrcode

qr = qrcode.QRCode(version=None)
qr.add_data('http://chase.com/')
qr.make(fit=True)
img = qr.make_image()
img.save('test1.png')

qr.clear()
qr.add_data('http://srv.prof-morii.net/∼lab')
qr.make(fit=True)
img = qr.make_image()
img.save('test2.png')

qr.clear()
qr.add_data('http://chase.com/')
qr.make(fit=True)
img = qr.make_image()
img.save('test3.png')

Expected: test1.png == test3.png
Actual: test1.png is a smaller size, as test3.png is the same size as test2.png.

This has to do with how the rs_blocks are looked up, but I couldn't figure out the bug.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions