feat product 后处理图片size改为320*700
fix
This commit is contained in:
@@ -165,12 +165,12 @@ def pre_processing_image(image_url):
|
||||
|
||||
|
||||
def post_processing_image(image, left, top):
|
||||
resized_image = image.resize((int(image.width * (700 / image.height)), 700))
|
||||
resized_image = image.resize((int(image.width * (768 / image.height)), 768))
|
||||
# 计算裁剪的坐标
|
||||
left = (resized_image.width - 320) // 2
|
||||
left = (resized_image.width - 512) // 2
|
||||
upper = 0
|
||||
right = left + 320
|
||||
lower = 700
|
||||
right = left + 512
|
||||
lower = 768
|
||||
|
||||
# 进行裁剪
|
||||
cropped_image = resized_image.crop((left, upper, right, lower))
|
||||
|
||||
Reference in New Issue
Block a user