Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Convert all images in folder to jpg python

from PIL import Image 
import os 

path = r'C:Usersdavid.hanDesktopCOPY_images_files'

for file in os.listdir(path): 
    if file.endswith(".jpg"): 
        img = Image.open(file)
        file_name, file_ext = os.path.splitext(file)
        img.save('/png/{}.png'.format(file_name))
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Convert #images #folder #jpg #python
ADD COMMENT
Topic
Name
5+7 =