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