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)

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM