Skip to content

Conversation

@ThomasSession
Copy link
Collaborator

SES-4663 - Updated qr scanning logic to better handle various forms of QRs

Comment on lines 272 to 290
val y = ByteArray(w * h)
if (pixelStride == 1 && rowStride == w) {
buf.get(y, 0, y.size)
} else {
val dup = buf.duplicate()
var dst = 0
for (row in 0 until h) {
val rowStart = row * rowStride
if (pixelStride == 1) {
dup.position(rowStart)
dup.get(y, dst, w)
dst += w
} else {
for (col in 0 until w) {
y[dst++] = dup.get(rowStart + col * pixelStride)
}
}
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe explain this a little bit in the comment?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added comments

@ThomasSession ThomasSession merged commit 0b318db into release/1.28.2 Oct 13, 2025
4 checks passed
@ThomasSession ThomasSession deleted the fix/ses-4663-better-qr-scanning branch October 13, 2025 23:49
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.

2 participants