修复图片改造尺寸保持

保持图片改造提交与画布回填的原图尺寸
在 VectorEngine 边界对齐非 16 倍数参考图并恢复目标尺寸
补充前后端回归测试与编辑器尺寸契约文档
This commit is contained in:
2026-07-11 18:10:00 +08:00
parent d756e8e04b
commit 300e69c97d
9 changed files with 243 additions and 54 deletions
@@ -287,8 +287,8 @@ describe('ImageCanvasGenerationLayerModel', () => {
const sourceLayer = createSourceLayer({
width: 320,
height: 240,
originalWidth: 1024,
originalHeight: 768,
originalWidth: 1537,
originalHeight: 1025,
});
const layer = applyImageEditResultToSourceLayer({
generated: createGenerated({
@@ -313,10 +313,10 @@ describe('ImageCanvasGenerationLayerModel', () => {
id: 'layer-source',
title: '源图',
src: 'data:image/png;base64,edited',
width: 1536,
height: 1024,
originalWidth: 1536,
originalHeight: 1024,
width: 320,
height: 240,
originalWidth: 1537,
originalHeight: 1025,
resourceId: 'resource-edited',
sourceResourceId: 'resource-source',
objectKey: 'generated/edited.png',