feat 结果图宽度自适应

fix
This commit is contained in:
zhouchengrong
2024-08-01 17:46:26 +08:00
parent b75dd7161a
commit 529bb02393
2 changed files with 11 additions and 7 deletions

View File

@@ -181,7 +181,7 @@ def upload_images(image_obj):
def update_base_size_priority(layers, size):
# 计算新图片的宽度和高度
max_x = max([layer["position"][1] + layer["image"].size[1] for layer in layers])
max_x = max([layer["position"][1] + layer["image"].size[0] for layer in layers])
min_x = min([layer["position"][1] for layer in layers])
new_width = max(size[0], max_x - min_x)
new_height = size[1]