添加不旋转方向的图片作为保底

This commit is contained in:
2024-07-10 13:59:17 +08:00
parent 93f7b2a734
commit 3f3a8277b9

View File

@@ -247,6 +247,9 @@ def photo_mask(pk_phhd, content):
angle = int(angles[1])
rotated_img = rotate_image(img["img"], angle)
results = get_mask_layout(rotated_img, content)
if not results and "0" not in angles:
angle = 0
results = get_mask_layout(img["img"], content)
if results:
is_masked = True