In this video, we'll show you the scripts, the solution, which resize this multiple images.
And this is the complete code.
Now this part's here, the two functions.
I didn't change anything.
I just reuse the functions from the previous script, which converted to one single image.
In addition, what I did is I imported OS the library and then I generated a list of image.
File names from the images directory, so as you can see here, I have this image directory and also
a precise image directory, which is empty for now.
I haven't executed the script yet, so images contains the original images to be resize and then iterated
through each of those image file names and resized.
So I gave the path the full path of the image.
So images slash the image name because as you know, the script is in this directory, so the script
has to use of the folder name first.
A slash and then the name of a file for each image.
So we resized each image by 10 or 10 percent and saved them in this path.
So resize is the name of the folder resized.
Slash the name of the new image, which is resize, dash and the name of the old original image, but
JPEG.
So image also has the JPEG extension, and that's it.
If I run this code, I get this printed out.
So the new dimensions from each image, you see different dimensions.
Since the original images were different and these are this resize images.
So it's working.
Good, thank you for following, and let's keep going.