图片统一转为RGB

This commit is contained in:
2024-06-21 08:50:30 +08:00
parent 69b804bf5e
commit 3f45432198

View File

@@ -76,6 +76,7 @@ def split_image(img_path, max_ratio=2.82, best_ration=1.41, overlap=0.05):
cropped_img = cropped_img.convert("RGB")
split_result.append({"img": cropped_img, "x_offset": offset, "y_offset": 0})
else:
img = img.convert("RGB")
split_result.append({"img": img, "x_offset": 0, "y_offset": 0})
return split_result