fix: allow scale shrink footprint tolerance
This commit is contained in:
parent
0bab5d1c8e
commit
c38003a382
@ -186,6 +186,7 @@ const SCALE_ADJUST_FALLBACK_MASK_LUMA_GAP = 18;
|
|||||||
const SCALE_ADJUST_FALLBACK_INPAINT_ITERATIONS = 180;
|
const SCALE_ADJUST_FALLBACK_INPAINT_ITERATIONS = 180;
|
||||||
const SCALE_ADJUST_SHRINK_OUTSIDE_FOOTPRINT_MAX_RATIO = 0.72;
|
const SCALE_ADJUST_SHRINK_OUTSIDE_FOOTPRINT_MAX_RATIO = 0.72;
|
||||||
const SCALE_ADJUST_SHRINK_MIN_SOURCE_OUTSIDE_PIXELS = 60;
|
const SCALE_ADJUST_SHRINK_MIN_SOURCE_OUTSIDE_PIXELS = 60;
|
||||||
|
const SCALE_ADJUST_SHRINK_TARGET_FOOTPRINT_MARGIN = 0.018;
|
||||||
|
|
||||||
const SUPPORTED_CANVAS_PROVIDER_TYPES = new Set([
|
const SUPPORTED_CANVAS_PROVIDER_TYPES = new Set([
|
||||||
"gemini",
|
"gemini",
|
||||||
@ -916,7 +917,10 @@ async function getScaleAdjustFootprintChangeStats(params: {
|
|||||||
});
|
});
|
||||||
const targetBox = rectToPixelBox({
|
const targetBox = rectToPixelBox({
|
||||||
height: sourceHeight,
|
height: sourceHeight,
|
||||||
region: targetRegion,
|
region: expandCanvasRegion(
|
||||||
|
targetRegion,
|
||||||
|
SCALE_ADJUST_SHRINK_TARGET_FOOTPRINT_MARGIN
|
||||||
|
),
|
||||||
width: sourceWidth,
|
width: sourceWidth,
|
||||||
});
|
});
|
||||||
const sourceMask = buildScaleAdjustFallbackSubjectMask({
|
const sourceMask = buildScaleAdjustFallbackSubjectMask({
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user