Hey! Big fan of the library, though I came across a strange issue the other day.
Seems as though the QR codes are rendered with a diagonal inversion for image/svg output.
This can be verified by looking at the format information (as per ISO/IEC 18004 2015), specifically the first two error correction bits and their placement.
Hey! Big fan of the library, though I came across a strange issue the other day.
Seems as though the QR codes are rendered with a diagonal inversion for image/svg output.
This can be verified by looking at the format information (as per ISO/IEC 18004 2015), specifically the first two error correction bits and their placement.
This diagram from Wikipedia summarizes the expectations of the format sequence. https://en.wikipedia.org/wiki/File:QR_Format_Information.svg
I used this snippet to create the
QRCode
for the following tests:With an
ECL::M
, we expect to see the ECL sequence of[1,0]
.In the following images, the red and blue borders highlight the format sequences, with the green highlighting the ECL sequence.
When printing to our terminal, we see the format sequences aligned correctly:
However, when rendering an SVG or PNG, we notice the diagonal inversion, causing inversion of the format sequences:
Note that the rest of the QR code is also diagonally inverted.