import cv2 import os for fi in os.listdir(‘./CCimage/‘): I=cv2.imread(‘./CCimage/‘+fi) cv2.imwrite(‘./CCimage/‘+fi.split(‘.‘)[0]+‘.png‘,I) os.remove(‘./CCimage/‘+fi) print fi
jpg格式图像转为png或者其它格式
原文:https://www.cnblogs.com/wjjcjj/p/14262591.html