fix(photos): shared EXIF-oriented decode for axis/overlay space (#72)

PhotoStage used new Image() while mask worker and calculate used bare
createImageBitmap; Orientation-8 matched-set JPEGs can disagree across
those paths so the approved pink axis is not the overlay (ux,uy).

One decodeOrientedBitmap helper always requests imageOrientation
from-image (with bare fallback), wired into PhotoStage, mask.worker,
and session calculate/siblings.
This commit is contained in:
2026-09-16 05:08:13 +00:00
parent b8e69b5239
commit 037a4b870a
6 changed files with 299 additions and 79 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
import { minAreaRect, slabBounds } from '../geometry/rect';
import type { MaskParams, WorkerIn, WorkerOut } from '../capture/capture.types';
import { decodeOrientedBitmap } from '../decodeOrientedBitmap';
let bitmap: ImageBitmap | null = null;
let data: Uint8ClampedArray | null = null;
@@ -69,7 +70,7 @@ self.onmessage = (e: MessageEvent<WorkerIn>) => {
}
data = null;
w = h = 0;
createImageBitmap(msg.blob)
decodeOrientedBitmap(msg.blob)
.then((bmp) => {
w = bmp.width;
h = bmp.height;