Add D.RANGE toggle chip to LIGHT tab; letterbox camera polaroid to 3:4 card

This commit is contained in:
2026-09-08 17:26:39 +07:00
parent b5a257e033
commit 669224fa39
2 changed files with 63 additions and 60 deletions
+7 -3
View File
@@ -395,14 +395,18 @@ export default function Viewfinder({
return { dx: (vw - dw) / 2, dy: (vh - dh) / 2, dw, dh };
}, [skiaImage, vw, vh]);
// Polaroid card geometry (JS/overlay space) for the CURRENT mode. Library
// stills keep the photo aspect; camera previews use the screen aspect (the
// feed fills the screen, so the card overlays it in view coordinates).
// stills keep the photo aspect; the camera assumes the upright capture
// aspect of the photo output (4:3 sensor → 3:4 portrait), NOT the screen
// aspect: a screen-aspect window made the card nearly fullscreen and
// pole-like, whereas the real print is a shorter 3:4 card letterboxed on
// screen. ponytail: verified on Xiaomi quality-mode captures (4:3); if the
// session negotiates 16:9 photos, change to 9/16.
const polaroidGeo = useMemo(() => {
if (selectedFrame !== 'polaroid') return null;
const aspect =
mode === 'library' && skiaImage && skiaImage.width() > 0 && skiaImage.height() > 0
? skiaImage.width() / skiaImage.height()
: vw / vh;
: 3 / 4;
return polaroidLayout(vw, vh, aspect, 'contain');
}, [selectedFrame, mode, skiaImage, vw, vh]);
const onLibTouchStart = (e: any) => {