修改为高分辨率
This commit is contained in:
@@ -3,9 +3,9 @@ from PIL import Image
|
||||
import os
|
||||
|
||||
# 全局变量定义分辨率
|
||||
RESIZE_TO = (256, 256)
|
||||
LARGE_IMAGE_SIZE = (2048, 2048)
|
||||
IMAGE_COUNT = 64
|
||||
RESIZE_TO = (512, 512)
|
||||
LARGE_IMAGE_SIZE = (4096, 2048)
|
||||
IMAGE_COUNT = 32
|
||||
|
||||
ROOT_DIR = '../example/src/main/assets/pic'
|
||||
|
||||
@@ -54,7 +54,8 @@ def remove_white_border(image):
|
||||
def resize_image(image_path):
|
||||
image = Image.open(image_path).convert('RGBA')
|
||||
image = remove_white_border(image)
|
||||
return image.resize(RESIZE_TO)
|
||||
#return image.resize(RESIZE_TO)
|
||||
return image
|
||||
|
||||
def main(json_file_path):
|
||||
# 确保使用完整路径
|
||||
|
||||
Reference in New Issue
Block a user