图片拓展

This commit is contained in:
AbyssYuan0
2024-01-19 14:00:49 +08:00
parent b7c75f1d64
commit 9bfe3f45da
+1 -1
View File
@@ -976,7 +976,7 @@ class ExpandImageWithColor:
def expand_image_with_color(self, image, top, bottom, left, right, color=None):
img = tensorToImg(image)
img = img.convert("RGBA")
# Determine the new size of the image
new_width = img.width + left + right
new_height = img.height + top + bottom