img = cv2.imread(imgpath, 1) #读取图片 dirpath = new_image_path #压缩后存储路径 file_name, file_extend = os.path.splitext(f) #将文件名的,名字和后缀进行分割 dst = os.path.join(os.path.abspath(dirpath), file_name + '.png') #文件最终保存的路径及名字(名字和压缩前的名字一致), pri...