From e21a7672b1d100ee1b59d65404e9ffc6dc5057b1 Mon Sep 17 00:00:00 2001 From: munzzyy Date: Sun, 5 Jul 2026 16:47:10 -0500 Subject: [PATCH] fix github issue #121 - correct bitmap stride in QR code generation setPixels() was passed width (the requested dimension) as the row stride instead of w (the actual BitMatrix width returned by zxing). Since the pixel array is filled using w as the row stride, any mismatch between width and w shifts every row after the first, corrupting the QR code so it can't be scanned. --- .../main/java/org/witness/proofmode/share/SocialImageUtil.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/witness/proofmode/share/SocialImageUtil.kt b/app/src/main/java/org/witness/proofmode/share/SocialImageUtil.kt index 48a95746..28c1e7e8 100644 --- a/app/src/main/java/org/witness/proofmode/share/SocialImageUtil.kt +++ b/app/src/main/java/org/witness/proofmode/share/SocialImageUtil.kt @@ -151,7 +151,7 @@ class SocialImageUtil { } val bitmap = Bitmap.createBitmap(w, h, Bitmap.Config.ARGB_8888) - bitmap.setPixels(pixels, 0, width, 0, 0, w, h) + bitmap.setPixels(pixels, 0, w, 0, 0, w, h) return bitmap }