Skip to content

Conversation

Michael-Hollister
Copy link

Wanted to share a fix for QR code generation in case you are open to contributions:

Fixing an issue where the QR alignment pattern position array is not created in ascending order. When the array is out-of-order, this breaks the array ordering assumption in qrCode.draw.brs:_qrCode_draw_drawFunctionPatterns that prevents alignment patterns being generated over finder patterns. This results in the drawn QR code being invalid (for large encoded text size) and not scannable with a QR code scanner.

qrCode.draw.brs:_qrCode_draw_drawFunctionPatterns:

  ' Don't draw on the three finder corners
  if (not ((i = 0) and (j = 0) or (i = 0) and (j = numAlign - 1) or (i = numAlign - 1) and (j = 0))) then
      m.drawAlignmentPattern(alignPatPos[i], alignPatPos[j])
  end if

Additionally removed the splice function since it was not used anywhere else in the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant