新增一张文字图片

将输入模式改好
This commit is contained in:
Luthics 2023-01-09 00:22:59 +08:00
parent ad3274826b
commit 007d16227c
2 changed files with 12 additions and 12 deletions

BIN
imgs/text.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

22
main.py
View File

@ -5,18 +5,18 @@ from tqdm import tqdm
# 输入数据 # 输入数据
# img = input("请输入图片路径:") img = input("请输入图片路径:")
# new_width = int(input("请输入新宽度(px)")) new_width = int(input("请输入新宽度(px)"))
# new_height = int(input("请输入新高度(px)")) new_height = int(input("请输入新高度(px)"))
# print("模式 0 双线性插值") print("模式 0 双线性插值")
# print("模式 1 最邻近插值") print("模式 1 最邻近插值")
# print("模式 2 高斯模糊缩放") print("模式 2 高斯模糊缩放")
# mode = int(input("请输入模式:")) mode = int(input("请输入模式:"))
img = 'imgs/xjtu.bmp' # img = 'imgs/text.bmp'
new_width = 256 # new_width = 2560 * 3
new_height = 256 # new_height = 2560
mode = 1 # mode = 0
if (mode not in [0, 1, 2]): if (mode not in [0, 1, 2]):
mode = 0 mode = 0