how to open img from folder from inside folder python code example
Example 1: python get all images in directory
import glob
for filename in glob.iglob(root_dir + '**/*.jpg', recursive=True):
# Do something
Example 2: getting image from path python
from PIL import Image
import glob
image_list = []
for filename in glob.glob('yourpath/*.gif'): #assuming gif
im=Image.open(filename)
image_list.append(im)