fix(capture): lower inventory PNG floor to 800px
Product call for the WooCommerce redo. Calculate accepts sources whose post-crop shorter side is at least 800px. Warn copy and CAPTURE.md match. No upscale still holds.
This commit is contained in:
+2
-2
@@ -109,7 +109,7 @@ On Calculate, the app builds the inventory image from the approved mask:
|
|||||||
1. Keep slab pixels from the source photo. Removed pixels are transparent.
|
1. Keep slab pixels from the source photo. Removed pixels are transparent.
|
||||||
2. Place the slab in a 3:4 portrait frame, centered.
|
2. Place the slab in a 3:4 portrait frame, centered.
|
||||||
3. Scale so the widest and tallest points of the slab fill 80% of the frame. Extra margin where the slab is narrower.
|
3. Scale so the widest and tallest points of the slab fill 80% of the frame. Extra margin where the slab is narrower.
|
||||||
4. After that crop, shorter side ≥ 1600px when the source can supply it. Otherwise warn and require a new photo. No upscale from an undersized source.
|
4. After that crop, shorter side ≥ 800px when the source can supply it. Otherwise warn and require a new photo. No upscale from an undersized source.
|
||||||
5. Encode as PNG with alpha.
|
5. Encode as PNG with alpha.
|
||||||
|
|
||||||
## Device draft
|
## Device draft
|
||||||
@@ -134,7 +134,7 @@ The first inventory photo is the measurement reference. Later inventory photos u
|
|||||||
| Alpha | Kept through encode and upload |
|
| Alpha | Kept through encode and upload |
|
||||||
| Aspect | 3:4 portrait |
|
| Aspect | 3:4 portrait |
|
||||||
| Layout | Slab centered, 80% fill at the widest and tallest points |
|
| Layout | Slab centered, 80% fill at the widest and tallest points |
|
||||||
| Size | After crop, shorter side ≥ 1600px when the source can supply it |
|
| Size | After crop, shorter side ≥ 800px when the source can supply it |
|
||||||
|
|
||||||
Source below that floor: warn and require a new photo. No upscale from an undersized source.
|
Source below that floor: warn and require a new photo. No upscale from an undersized source.
|
||||||
Editor preview of alpha is a light gray checkerboard. The storefront uses the theme background.
|
Editor preview of alpha is a light gray checkerboard. The storefront uses the theme background.
|
||||||
|
|||||||
@@ -107,7 +107,7 @@
|
|||||||
<div><span>Scale</span><span>{state.results.scale.toFixed(2)} px/in</span></div>
|
<div><span>Scale</span><span>{state.results.scale.toFixed(2)} px/in</span></div>
|
||||||
</div>
|
</div>
|
||||||
{#if state.results.sourceBelowFloor}
|
{#if state.results.sourceBelowFloor}
|
||||||
<div class="warn">Source is below the 1600px floor for the inventory PNG. Retake a larger photo.</div>
|
<div class="warn">Source is below the 800px floor for the inventory PNG. Retake a larger photo.</div>
|
||||||
{/if}
|
{/if}
|
||||||
{#if pngUrl && !state.results.sourceBelowFloor}
|
{#if pngUrl && !state.results.sourceBelowFloor}
|
||||||
<div class="png-wrap">
|
<div class="png-wrap">
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import type { Mask, Source } from '../capture/capture.types';
|
import type { Mask, Source } from '../capture/capture.types';
|
||||||
|
|
||||||
const FLOOR = 1600; // shorter side, px
|
const FLOOR = 800; // shorter side, px
|
||||||
const FILL = 0.8; // 80% fill at the widest and tallest points of the slab
|
const FILL = 0.8; // 80% fill at the widest and tallest points of the slab
|
||||||
const ASPECT_W = 3;
|
const ASPECT_W = 3;
|
||||||
const ASPECT_H = 4;
|
const ASPECT_H = 4;
|
||||||
|
|||||||
Reference in New Issue
Block a user