feat(#24): Gate B 3:4 crop + no upscale (TV-6, TV-7)

TV-6: 3:4 portrait crop, 80% fill at extremes, transparent PNG, shorter side >= 1600px when source allows.
TV-7: undersized source warning, no upscaling, photo not publishable until retake.

Real fixture output:
- TV-6 large source (4000x3200, slab 1281x3000): crop target 1601x2135, shorter 1601 >= 1600, fill at limiting dim 0.80
- TV-7 small source (800x640, slab 400x300): crop target 281x375, shorter 281 < 1600, undersized
- No upscale property: output never exceeds source dimensions

New files:
- frontend/src/lib/pipeline/crop.ts: cropTo34(), findSlabBounds(), computeCropTarget(), checkSourceSize()
- frontend/src/__tests__/fixtures/crop.ts: tv6LargeSourceFixture, tv7SmallSourceFixture, simpleAxis
- frontend/src/__tests__/tv6-tv7-crop.test.ts: 7 tests (2 TV-6, 2 TV-7, 3 property)
This commit is contained in:
grokbot_ty
2026-09-07 06:24:00 +00:00
parent 08c463b8d8
commit f7040f5947
5 changed files with 560 additions and 0 deletions
+1
View File
@@ -3,3 +3,4 @@ export * from "./types.js";
export * from "./mask.js";
export * from "./units.js";
export * from "./axis.js";
export * from "./crop.js";