web: a wall frame keeps the crop that was applied
CROP + APPLY then a wall frame handed back the whole photo: the crop block was skipped outright for both walls, so the artwork hung the original. The walls' own opening still ignores the aspect chip — that is what the exclusion was for — but the visitor's crop is theirs to keep. Measured with a source banded red on top and blue below, cut away by a 16:9 crop: through WALL FRAME and WALL FRAME LANDSCAPE the bands used to come back (569k and 350k red pixels); both now export clean.
This commit is contained in:
@@ -279,7 +279,10 @@ export async function renderPhoto(input: RenderInput): Promise<RenderResult | nu
|
||||
const aspectWH = options?.aspect && options.aspect !== 'full' ? ASPECT_RATIO_W_H[options.aspect] : null;
|
||||
const cropRect = options?.cropRect ?? null;
|
||||
const ratioWH = cropRect ? null : options?.cropWH ?? aspectWH;
|
||||
if ((cropRect || ratioWH) && !isWallframe(frameId)) {
|
||||
// A wall is an artwork with its own opening, so the aspect chip (ratioWH)
|
||||
// has nothing to say there — but the visitor's own crop does, or a photo
|
||||
// that was cropped and applied comes back whole behind the frame.
|
||||
if (cropRect || (ratioWH && !isWallframe(frameId))) {
|
||||
const curAspect = width / height;
|
||||
let cropW = width;
|
||||
let cropH = height;
|
||||
|
||||
Reference in New Issue
Block a user