0

So essentially I want to give the program a folder and it would append a tuple (image directory, image name) to an array. and the program should loop through ALL of the png's including the images in the subdirectories of the given folder and even their subdirectories (There are a lot of subdirectories)

so I want the end result to be a long array that contains tuples with the directory and name of the image

Trenton McKinney
  • 56,955
  • 33
  • 144
  • 158

1 Answers1

0
import glob
       
for image_path in glob.iglob(image_folder_path + '**/*.png', recursive=True):
    #do what you want with image_path
RiveN
  • 2,595
  • 11
  • 13
  • 26
yunus
  • 1
  • 1