bug(photos): overlay dims not following set axis — EXIF Image vs createImageBitmap (#72) #72

Closed
opened 2026-09-16 05:04:45 +00:00 by grokbot_ty · 1 comment
Owner

Ty confirmed M2 complete (chat). Closing after UAT.

Ty confirmed M2 complete (chat). Closing after UAT.
grokbot_ty added this to the M2 Photos milestone 2026-09-16 05:04:45 +00:00
Author
Owner

Deployed for Ty re-UAT (leaving OPEN)

Root cause (confirmed): matched-set JPEGs are EXIF Orientation 8 (SOF 4000×2256 → oriented 2256×4000). PhotoStage decoded with new Image() while mask.worker / session.calculate used bare createImageBitmap(blob) with no imageOrientation. Those paths can disagree → pink axis space ≠ mask/overlay bitset space, so width dims looked slanted vs the Length axis you set.

Fix tip: 037a4b870ae97cbce8ed958ef8e23e30ec015953 on m2-ds

  • Shared frontend/src/decodeOrientedBitmap.ts → always createImageBitmap(blob, { imageOrientation: 'from-image' }) (+ bare fallback)
  • Wired: PhotoStage.svelte (canvas sized from oriented bitmap; no Image for geometry), mask.worker.ts init, session.ts calculate + sibling encodes

Tests: 84/84 pass (incl. orient-8 fixture → 2256×4000; angleDeg=90 → width atan2 within 2° of horizontal; #70/#71 contracts still green)

Overnight redeploy (only :10881):

  • container slabuploader-m2-overnight / image slabuploader-m2:overnight
  • live asset index-CrUWE4SC.js contains from-image / imageOrientation
  • curl http://100.64.0.9:10881/ → 200
  • Ty local :18080 still up; did not touch :10880

Please re-check

Same slab as the slanted-width fail: set Length axis to length ⊥ cut ends, Calculate, then confirm overlay width lines are square to the cuts (horizontal when long side is vertical) and match the pink axis you approved — not slanted relative to the wood ends.

Leave open until you PASS/FAIL.

## Deployed for Ty re-UAT (leaving OPEN) **Root cause (confirmed):** matched-set JPEGs are EXIF Orientation 8 (SOF 4000×2256 → oriented 2256×4000). `PhotoStage` decoded with `new Image()` while `mask.worker` / `session.calculate` used bare `createImageBitmap(blob)` with no `imageOrientation`. Those paths can disagree → pink axis space ≠ mask/overlay bitset space, so width dims looked slanted vs the Length axis you set. **Fix tip:** `037a4b870ae97cbce8ed958ef8e23e30ec015953` on `m2-ds` - Shared `frontend/src/decodeOrientedBitmap.ts` → always `createImageBitmap(blob, { imageOrientation: 'from-image' })` (+ bare fallback) - Wired: `PhotoStage.svelte` (canvas sized from oriented bitmap; no Image for geometry), `mask.worker.ts` init, `session.ts` calculate + sibling encodes **Tests:** 84/84 pass (incl. orient-8 fixture → 2256×4000; `angleDeg=90` → width atan2 within 2° of horizontal; #70/#71 contracts still green) **Overnight redeploy (only :10881):** - container `slabuploader-m2-overnight` / image `slabuploader-m2:overnight` - live asset `index-CrUWE4SC.js` contains `from-image` / `imageOrientation` - `curl http://100.64.0.9:10881/` → **200** - Ty local `:18080` still up; **did not touch :10880** ### Please re-check Same slab as the slanted-width fail: set Length axis to length ⊥ cut ends, Calculate, then confirm overlay **width lines are square to the cuts** (horizontal when long side is vertical) and match the pink axis you approved — not slanted relative to the wood ends. Leave open until you PASS/FAIL.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Ty_Tech/SlabUploader#72