What do you want to save?
Add Code snippet
New code examples
-
Python 2021-09-19 08:43:03
convert files from jpg to png and save in a new directory python
from PIL import Image import os directory = r'D:\PATH' c=1 for filename in os.listdir(directory): if filename.endswith(".jpg"): im = Image.open(filename) name='img'+str(c)+'.png' rgb_im = im.convert('RGB') rg... Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5