From 3e586e65251f469a223ecc64f9eb6da86ec14db2 Mon Sep 17 00:00:00 2001 From: Martin Guillon Date: Thu, 10 Sep 2026 17:13:38 +0200 Subject: [PATCH] fix(common): decode the crop view image at screen resolution `CropView` computed its decode size from `Screen.mainScreen.widthDIPs`, but that number reaches decoders that expect pixels: `decodeWidth` ends up in Fresco's `ResizeOptions`, and `loadImage`'s `resizeThreshold` in the native processor. On a 1080x2340 screen the image was therefore decoded at 780px and upscaled to fill the view, so a freshly captured photo looked far blurrier than the camera preview it replaces. Reuse `IMAGE_DECODE_HEIGHT`, which is built from `widthPixels`/`heightPixels` and is already what the rest of the app passes as a decode size. Co-Authored-By: Claude Opus 5 --- app/components/common/CropView.svelte | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/components/common/CropView.svelte b/app/components/common/CropView.svelte index fc43e781..6158e197 100644 --- a/app/components/common/CropView.svelte +++ b/app/components/common/CropView.svelte @@ -1,11 +1,11 @@