修复图片改造后二维清晰度降级问题
前端按图层真实尺寸恢复图片改造比例与清晰度 后端在角色去背景后恢复生成原图像素尺寸 补充前后端二千像素尺寸回归测试 同步更新图片画布技术文档与项目决策记录
This commit is contained in:
@@ -672,6 +672,33 @@ describe('ImageCanvasGenerationDialogModel', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('preserves 2K dimensions when reopening a persisted character layer', () => {
|
||||
expect(
|
||||
createLayerGenerationDialogDraft({
|
||||
sourceLayer: createLayer({
|
||||
sourceType: 'generated',
|
||||
assetKind: 'character',
|
||||
model: IMAGE_MODEL_NANOBANANA2,
|
||||
originalWidth: 2048,
|
||||
originalHeight: 2048,
|
||||
generationInputs: {
|
||||
fields: [{ title: '角色设定', value: '香水师角色' }],
|
||||
references: [],
|
||||
},
|
||||
}),
|
||||
canvasSize: { width: 960, height: 720 },
|
||||
viewport: { x: 0, y: 0, scale: 1 },
|
||||
}),
|
||||
).toMatchObject({
|
||||
mode: 'character',
|
||||
prompt: '香水师角色',
|
||||
imageModel: IMAGE_MODEL_NANOBANANA2,
|
||||
aspectRatio: '1:1',
|
||||
imageSize: '2K',
|
||||
generatedLayerId: 'layer-source',
|
||||
});
|
||||
});
|
||||
|
||||
it('inherits and normalizes quick edit model parameters from the source', () => {
|
||||
expect(
|
||||
createQuickEditPanelDraft(
|
||||
|
||||
Reference in New Issue
Block a user