From d55f8a1c0aebfd3f92e87d9d9bf23accce98e878 Mon Sep 17 00:00:00 2001 From: zchen Date: Sat, 30 Aug 2025 10:46:23 +0800 Subject: [PATCH] 1 --- app/service/design_fast/pipeline/print_painting.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/service/design_fast/pipeline/print_painting.py b/app/service/design_fast/pipeline/print_painting.py index aa3f7b8..e4a9dc9 100644 --- a/app/service/design_fast/pipeline/print_painting.py +++ b/app/service/design_fast/pipeline/print_painting.py @@ -112,9 +112,9 @@ class PrintPainting: else: start_x = x - if y >= 0: # 如果X轴偏移量大于0,说明印花需要被裁剪至合适大小 或当Y轴偏移量大于印花宽度时,裁剪后的印花宽度为0 - rotate_image = rotate_image[y:, :] - rotate_mask = rotate_mask[y:, :] + if y <= 0: # 如果X轴偏移量大于0,说明印花需要被裁剪至合适大小 或当Y轴偏移量大于印花宽度时,裁剪后的印花宽度为0 + rotate_image = rotate_image[abs(y):, :] + rotate_mask = rotate_mask[abs(y):, :] start_y = y = 0 else: start_y = y