xxxxxxxxxx
While I am using the code snippet I am getting this error "A module you have imported isn't available at the moment. It will be available soon."
xxxxxxxxxx
from PIL import Image
import os, os.path
imgs = []
path = "/home/tony/pictures"
valid_images = [".jpg",".gif",".png",".tga"]
for f in os.listdir(path):
ext = os.path.splitext(f)[1]
if ext.lower() not in valid_images:
continue
imgs.append(Image.open(os.path.join(path,f)))