#将8位的tif图片改为png图片
import os # os:操作系统相关的信息模块
data_base_dir="img"
listname=os.listdir(data_base_dir)
print(listname)
from PIL import Image
Image.MAX_IMAGE_PIXELS = None
for name in listname:
ss=name.split('.')[0]
im=Image.open('%s/%s.tif'%(data_base_dir,ss))
im.save('changedImg/%s.png'%(ss))