fix(browser-transfer): decode probe images without applying orientation (Q-6.1-8)
The header parser reads pre-rotation dimensions, but the default
createImageBitmap call applied EXIF/irot orientation, so an orientation
5-8 JPEG or a rotated AVIF decoded with width and height swapped and was
rejected. The default bitmap factory now passes
{ imageOrientation: "none" }. An injected createBitmap is unchanged.
Verified: RED test "decodes with the default bitmap factory without
applying orientation" (options were missing) + all gates. Real-browser
decode of a rotated image is not exercised here.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
818cbd3839
commit
9e387b7ec3
@@ -49,7 +49,10 @@ export function createBrowserImageProbe(
|
||||
const createBitmap =
|
||||
dependencies.createBitmap ??
|
||||
(typeof createImageBitmap === "function"
|
||||
? async (image: Blob) => createImageBitmap(image)
|
||||
? // Q-6.1-8. The header parser reads pre-rotation dimensions, so the
|
||||
// decode must not apply EXIF/irot orientation and swap them.
|
||||
async (image: Blob) =>
|
||||
createImageBitmap(image, { imageOrientation: "none" })
|
||||
: undefined);
|
||||
const timeoutMs = dependencies.timeoutMs ?? DEFAULT_TIMEOUT_MS;
|
||||
const timers = snapshotAbortTimers(
|
||||
|
||||
Reference in New Issue
Block a user