1
00:00:00,120 --> 00:00:07,200
In this video, we'll show you the scripts, the solution, which resize this multiple images.

2
00:00:07,620 --> 00:00:10,770
And this is the complete code.

3
00:00:11,160 --> 00:00:13,320
Now this part's here, the two functions.

4
00:00:13,320 --> 00:00:15,060
I didn't change anything.

5
00:00:15,390 --> 00:00:22,080
I just reuse the functions from the previous script, which converted to one single image.

6
00:00:22,350 --> 00:00:31,170
In addition, what I did is I imported OS the library and then I generated a list of image.

7
00:00:32,259 --> 00:00:39,460
File names from the images directory, so as you can see here, I have this image directory and also

8
00:00:39,490 --> 00:00:43,090
a precise image directory, which is empty for now.

9
00:00:43,090 --> 00:00:50,380
I haven't executed the script yet, so images contains the original images to be resize and then iterated

10
00:00:50,410 --> 00:00:54,910
through each of those image file names and resized.

11
00:00:55,510 --> 00:01:00,070
So I gave the path the full path of the image.

12
00:01:00,070 --> 00:01:08,530
So images slash the image name because as you know, the script is in this directory, so the script

13
00:01:08,980 --> 00:01:12,070
has to use of the folder name first.

14
00:01:12,520 --> 00:01:16,720
A slash and then the name of a file for each image.

15
00:01:17,260 --> 00:01:25,850
So we resized each image by 10 or 10 percent and saved them in this path.

16
00:01:25,870 --> 00:01:29,080
So resize is the name of the folder resized.

17
00:01:29,410 --> 00:01:38,320
Slash the name of the new image, which is resize, dash and the name of the old original image, but

18
00:01:38,320 --> 00:01:39,100
JPEG.

19
00:01:39,490 --> 00:01:43,430
So image also has the JPEG extension, and that's it.

20
00:01:43,450 --> 00:01:48,200
If I run this code, I get this printed out.

21
00:01:48,200 --> 00:01:52,150
So the new dimensions from each image, you see different dimensions.

22
00:01:52,390 --> 00:01:57,610
Since the original images were different and these are this resize images.

23
00:01:58,640 --> 00:02:00,740
So it's working.

24
00:02:00,860 --> 00:02:03,710
Good, thank you for following, and let's keep going.

