Python, Automation, Data Science, Artificial Intelligence, Llm.
Directory containing the images image_directory = 'path/to/image/directory' # Desired size for resized images new_size = (800, 600) # Iterate over the images in the directory for filename in os.listdir(image_directory): if filename.endswith('.jpg') or filename.endswith('.png'): # Open the image