python版本图片下采样
# file_list = os.listdir(path) # # for i in range(len(file_list)): # print(file_list[i]) # name = file_list[i].split('.')[-2] # path_hr = path+'/'+file_list[i] # img_hr = Image.open(path_hr) # img_ref = img_hr.resize( # (x // 4 for x in img_hr.size), Image.BICUBIC) # path_ref = './..'+name+'_ref'+'.png' # img_ref.save(path_ref)