Skip to content

fix(qr): decode QR/QRIS from large photos (downscale + retry) - #218

Merged
slaveofcode merged 2 commits into
developfrom
fix/qr-decode-downscale
Aug 14, 2026
Merged

fix(qr): decode QR/QRIS from large photos (downscale + retry)#218
slaveofcode merged 2 commits into
developfrom
fix/qr-decode-downscale

Conversation

@slaveofcode

Copy link
Copy Markdown
Owner

A user's photo of a QRIS standee (4080×3060, glare, angled) failed to decode — jsQR chokes on huge full-res images. New decodeQrFromFile retries the decode at several downscaled sizes (1600/1000/1300/800/600/500 px long-edge) with inversionAttempts:'attemptBoth'. Verified: the user's exact image decodes at the 1000px pass. Wired into both QRIS Decoder and QR Code Reader; qrScaleTargets unit-tested.

…izes

jsQR is unreliable on full-resolution phone photos (e.g. a 12MP shot of a
QRIS standee), so detection failed. New shared decodeQrFromFile retries the
decode at several downscaled sizes with inversion attempts, which decodes
real-world photos with glare and angle. Wired into QRIS Decoder and QR Code
Reader.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
🔵 In progress
View logs
goodwebtools 33909db Aug 14 2026, 05:17 AM

jsQR alone fails on real camera photos of QR/QRIS codes (glare, angle, small
code in a big frame). New decode pipeline: native BarcodeDetector first
(fast on Android/Chrome), then zxing-wasm with tryHarder (robust on every
browser incl. iOS Safari; wasm served same-origin from /zxing_reader.wasm),
then jsQR multi-scale as a fallback. Verified: a user's QRIS standee photo
now decodes end-to-end.
@slaveofcode
slaveofcode merged commit 6618a8c into develop Aug 14, 2026
1 check passed
@slaveofcode
slaveofcode deleted the fix/qr-decode-downscale branch August 14, 2026 05:27
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