AIX存储管理之逻辑卷的创建及属性的查看和修改

VB.net概述

  返回  

python 批量把png文件改成jpg文件

2021/8/21 22:05:14 浏览:
from sklearn.model_selection import train_test_split
from PIL import Image
import os


path="C:/Users/86152/OneDrive/桌面/facade/test_label"

dat= os.listdir(path)


for file in dat:

    ff=os.path.splitext(file)[0]
    im = Image.open("C:/Users/86152/OneDrive/桌面/facade/test_label/"+file)
    rgb_im = im.convert('RGB')
    rgb_im.save('C:/Users/86152/OneDrive/桌面/test_label/'+ff+".jpg")


path="C:/Users/86152/OneDrive/桌面/facade/train_label"

dat= os.listdir(path)


for file in dat:
    ff=os.path.splitext(file)[0]
    im = Image.open("C:/Users/86152/OneDrive/桌面/facade/train_label/"+file)
    rgb_im = im.convert('RGB')
    rgb_im.save('C:/Users/86152/OneDrive/桌面/train_label/'+ff+".jpg")


联系我们

如果您对我们的服务有兴趣,请及时和我们联系!

服务热线:18288888888
座机:18288888888
传真:
邮箱:888888@qq.com
地址:郑州市文化路红专路93号