fix(*): 质量检查与版本发布 - 修复格式门禁和创作灵感兼容导出并发布 v1.6.2

This commit is contained in:
ddcat666
2026-10-08 20:43:15 +08:00
parent 04689257d2
commit 9174aae013
86 changed files with 22712 additions and 635 deletions

View File

@@ -36,9 +36,7 @@ export function resolveUpscaleSize(width: number, height: number, requested: num
assertPixelSize({ width, height });
if (!Number.isFinite(requested) || requested <= 0) throw new RangeError("目标尺寸无效");
const edge = Math.max(1, Math.min(MAX_UPSCALE_LONG_EDGE, Math.round(requested)));
return width >= height
? { width: edge, height: Math.max(1, Math.round((height / width) * edge)) }
: { width: Math.max(1, Math.round((width / height) * edge)), height: edge };
return width >= height ? { width: edge, height: Math.max(1, Math.round((height / width) * edge)) } : { width: Math.max(1, Math.round((width / height) * edge)), height: edge };
}
export function resolveCropPixels(size: PixelSize, selection?: ImageCropRect): ImageCropRect {