1
00:00:00,460 --> 00:00:01,160
Hi again.

2
00:00:01,730 --> 00:00:08,020
Now, what we have to do, we have, for example, this image like this, I want to put in our application.

3
00:00:08,290 --> 00:00:14,440
So what we have to do is just to import it in our program and put it in the video on the application.

4
00:00:15,350 --> 00:00:17,180
So I will close this one.

5
00:00:17,200 --> 00:00:25,090
Now, as you can see, I have put this image in the same folder of our application of our program.

6
00:00:25,090 --> 00:00:29,860
But you can put anywhere you want, as I told you, for it is the same thing for the PDF.

7
00:00:29,860 --> 00:00:33,760
If you want to put it in the same folder of your little file.

8
00:00:34,000 --> 00:00:38,850
In this case, you have to take the whole path where you are saving this image.

9
00:00:39,190 --> 00:00:46,390
But if you are putting the image in at the same place or the same folder of the title on why you would

10
00:00:46,390 --> 00:00:52,300
save a lot of time, not time, but we just take the name and you don't need to take the bus.

11
00:00:52,330 --> 00:00:57,560
OK, but it is it's up to you and you can do anything you want for this case.

12
00:00:58,090 --> 00:01:00,730
Now, as I told you, I have to take the image.

13
00:01:00,740 --> 00:01:06,810
But in this idea, I want to put the image before the text that we have.

14
00:01:07,030 --> 00:01:09,430
So I will take the image just here.

15
00:01:10,360 --> 00:01:11,920
I would put this one here.

16
00:01:11,920 --> 00:01:19,750
And to take the image, we will use a two other libraries, not one library and another function, which

17
00:01:19,750 --> 00:01:20,630
is to counter.

18
00:01:20,890 --> 00:01:27,940
So the first library, which is the other which is below, as I told you before, we we work with this.

19
00:01:28,420 --> 00:01:31,340
We are solid in this in the first video.

20
00:01:31,720 --> 00:01:41,290
So here we will take it just like this from Bill, which is from below import image.

21
00:01:41,300 --> 00:01:42,340
OK, like this.

22
00:01:42,790 --> 00:01:54,850
Then we will use another one, which is from the speech we import image like this.

23
00:01:55,450 --> 00:01:58,120
Then we for the moment we stop here.

24
00:01:58,120 --> 00:02:00,220
We don't need another another one.

25
00:02:01,150 --> 00:02:03,970
There is another function that we need, but not for the moment.

26
00:02:03,970 --> 00:02:05,030
We talk about it later.

27
00:02:05,080 --> 00:02:06,710
OK, will do step by step.

28
00:02:06,730 --> 00:02:11,460
OK, now we need these two functions so we will import it.

29
00:02:11,590 --> 00:02:15,810
OK, we don't want to import another library that we don't need for the moment.

30
00:02:16,060 --> 00:02:19,570
So I will just leave these two functions, which is image.

31
00:02:19,570 --> 00:02:28,080
And then we don't see images because this is library and contains some classes, et cetera.

32
00:02:28,240 --> 00:02:32,040
So we can see that this one is a class from this library.

33
00:02:32,100 --> 00:02:40,660
OK, the same thing for this one, because every any every class of this, which is image, an image

34
00:02:41,650 --> 00:02:43,030
contains another function.

35
00:02:43,060 --> 00:02:48,870
So in this case, we can say that function content function, but we can see that contain function.

36
00:02:49,420 --> 00:02:56,720
So, OK, now, but there is some cases that there is the files or library that contains just functions,

37
00:02:56,870 --> 00:02:57,970
does not contain classes.

38
00:02:58,220 --> 00:03:01,210
But in this case, this below is a large library.

39
00:03:01,210 --> 00:03:02,800
So it contains a lot of classes.

40
00:03:03,290 --> 00:03:06,780
Now here, where were we here?

41
00:03:06,820 --> 00:03:11,850
Now, as I told you, I want to put this image before the text or before this data.

42
00:03:12,010 --> 00:03:16,150
So I will just take it here and I will have to open it before.

43
00:03:16,330 --> 00:03:23,890
So to open an image using Pelo, I will have to I have to create a variable to take the role of this

44
00:03:23,890 --> 00:03:26,220
image as we did for the previous year.

45
00:03:26,380 --> 00:03:28,150
So we have image equal.

46
00:03:28,480 --> 00:03:31,240
Then we have to open it to OPNET.

47
00:03:31,240 --> 00:03:37,870
We have to take the we have to use this class, which is image that in this class there is a function

48
00:03:37,870 --> 00:03:38,680
that will open it.

49
00:03:38,680 --> 00:03:43,360
So which is open like this, open like this.

50
00:03:43,360 --> 00:03:46,030
And here we have to write the part of our image.

51
00:03:46,270 --> 00:03:53,770
In this case, as I told you, if we are saving the image at the same folder of our by.

52
00:03:54,440 --> 00:04:01,360
In this case, we have just to write the name of the the name of the image which is here in this case

53
00:04:01,360 --> 00:04:09,130
or audio book that PMG, we have to add always the extension of our image.

54
00:04:09,160 --> 00:04:14,390
OK, so here we have audio book that produces the same name of our image here.

55
00:04:14,920 --> 00:04:21,760
Then after opening the image we have just to convert it to a ticket image so that we can put it in the

56
00:04:21,760 --> 00:04:22,420
application.

57
00:04:22,460 --> 00:04:25,600
So to do this, we have just to write, for example, image.

58
00:04:25,930 --> 00:04:31,990
We can put it at the same variable, but I will just defer it so that you can understand that in this

59
00:04:31,990 --> 00:04:34,000
step we have changed the first image.

60
00:04:34,010 --> 00:04:37,000
So here we have, for example, the image one equals.

61
00:04:37,870 --> 00:04:43,300
Then here we have image, Teekay, like this, that photo image.

62
00:04:44,530 --> 00:04:53,410
Like this, and here we put the name of our image, which is this one image like this now after putting

63
00:04:53,440 --> 00:04:58,330
this after converting this image from this one to a ticket image.

64
00:04:58,540 --> 00:05:02,130
So here we can put this image in our application.

65
00:05:02,350 --> 00:05:08,320
So before that, to put any image or any item in our application, we have to put it in a label or something

66
00:05:08,320 --> 00:05:13,000
like this, because here in this case, we have label and we put in this label a text.

67
00:05:13,360 --> 00:05:15,130
But the same thing for the image.

68
00:05:15,130 --> 00:05:20,560
If we want to put an image in our application, we can put an image in a label, the reports, or we

69
00:05:20,560 --> 00:05:22,820
back that label in our application.

70
00:05:23,110 --> 00:05:28,720
So here we have to create another label then, but we will call it, for example, logo or something

71
00:05:28,720 --> 00:05:29,230
like this.

72
00:05:29,650 --> 00:05:34,960
Then here we have label and we will put it in the app, which is application.

73
00:05:34,960 --> 00:05:37,730
We can take this off, but I prefer to put it like this.

74
00:05:37,750 --> 00:05:44,080
So maybe if in future you want to create another another windows or something like this, so you will

75
00:05:44,080 --> 00:05:48,310
defer where you want to put your text or your image.

76
00:05:48,550 --> 00:05:54,610
Because if we are or if we have just one application or just one window in this case, for example,

77
00:05:54,940 --> 00:05:58,860
there is no problem if we if we write this one or we don't like this.

78
00:05:59,110 --> 00:06:06,580
But if you have two windows or you have a window, a mother window and the window, for example, in

79
00:06:06,580 --> 00:06:13,150
this case, you need to you need to write here the name of the window, or if you want to put this label

80
00:06:13,150 --> 00:06:18,790
in a frame or something like this, you have to write this the name of the frame here.

81
00:06:19,210 --> 00:06:22,300
But I prefer to write always these things.

82
00:06:22,300 --> 00:06:26,920
But it's up to you if you want to take it or you have you want to write it or not.

83
00:06:27,040 --> 00:06:35,260
OK, so here we have the first parameter, which is up then the other parameter, which is in this one,

84
00:06:35,260 --> 00:06:38,520
which was text because we wanted to put a text in this label.

85
00:06:38,770 --> 00:06:40,720
But in this case we have an image.

86
00:06:40,720 --> 00:06:44,530
So we have to take it to call the function, which is which is called image.

87
00:06:44,890 --> 00:06:46,540
This image, which is function.

88
00:06:46,540 --> 00:06:54,040
It is not like this because this one is variable, but this one is a function which is included in label

89
00:06:54,190 --> 00:06:56,140
and label included in decanted.

90
00:06:56,170 --> 00:07:02,330
OK, so here we have image equal that here with the image that we want, which is this one.

91
00:07:02,350 --> 00:07:08,770
OK, now after putting that we have to back this.

92
00:07:10,750 --> 00:07:16,090
I don't know, I don't know how to write what's now.

93
00:07:16,090 --> 00:07:21,820
After putting the image here, we have just to put this logo or park this label in our application so

94
00:07:21,820 --> 00:07:25,240
we see how it looks, as you can see here.

95
00:07:25,450 --> 00:07:28,360
Size, we didn't change to say so in this case.

96
00:07:28,360 --> 00:07:36,220
The I would just say it was decided like this so that you can see here, as you can see, the image

97
00:07:36,220 --> 00:07:41,310
take a lot of time, a lot of space of our application.

98
00:07:41,320 --> 00:07:45,030
So we need to revise it so that it will be OK in our application.

99
00:07:45,310 --> 00:07:51,240
So here there is a function included in in below.

100
00:07:51,250 --> 00:07:57,400
So it will be easy for us to do this, but we need to do it before this line because, well, when we

101
00:07:57,400 --> 00:08:05,290
write this line means that we take the final image and converted that before, because when we convert

102
00:08:05,290 --> 00:08:09,650
this, we have just to put it in the label then in the application.

103
00:08:09,850 --> 00:08:16,060
So if we want to do any operation or any processing in our image, we have to do it before this line

104
00:08:16,060 --> 00:08:18,720
because this line we take the last image.

105
00:08:18,730 --> 00:08:24,730
OK, you have to know that now, as I told you, we had in this one, we'll open it and this one will

106
00:08:24,730 --> 00:08:25,220
convert it.

107
00:08:25,240 --> 00:08:31,730
So if you want to do any processing, we have to do it between these two lines or these two comments.

108
00:08:32,530 --> 00:08:40,090
Now, if we want to convert the image, there is a function or if we want to decide an image that is

109
00:08:40,090 --> 00:08:42,130
a function included in the below.

110
00:08:42,130 --> 00:08:47,650
So we will declare another another variable.

111
00:08:47,650 --> 00:08:49,870
So I acreage, for example, image

112
00:08:52,420 --> 00:09:04,270
converted, for example, that here what we give is recited, resize it like this, that here equal.

113
00:09:04,600 --> 00:09:07,120
Then what we want to do, we want to resize this image.

114
00:09:07,130 --> 00:09:16,600
So here we have image that resize like this, that here inside this function there is some parameters.

115
00:09:16,600 --> 00:09:23,980
The first parameter is the with the height, the new with and height that we want for our image so that

116
00:09:24,580 --> 00:09:29,770
there is two parameters and there is two volleyball's that we want to change.

117
00:09:29,770 --> 00:09:34,660
But at the same parameter, which is the first one, we would like this because here we want to put

118
00:09:34,660 --> 00:09:40,780
the first parameter here, the second parameter, etc. So here we want to put to volleyball's but at

119
00:09:40,780 --> 00:09:43,350
the same variable and same parameter.

120
00:09:43,570 --> 00:09:43,990
So we have.

121
00:09:44,050 --> 00:09:47,020
To put it inside, two parameters, two parenthesis, OK?

122
00:09:47,380 --> 00:09:54,400
The first one will be the width and second one will be the high, but we will put it 70, 70, the same

123
00:09:54,430 --> 00:09:55,250
with and height.

124
00:09:55,270 --> 00:10:04,330
OK, then then here the second parameter, we will we will call a function that will in case we have

125
00:10:04,330 --> 00:10:10,540
a problem, where we when we recite the image, maybe we will have problem with aliens.

126
00:10:10,750 --> 00:10:18,100
So in this case, we have to take off or we have to take care of this problem.

127
00:10:18,250 --> 00:10:20,880
So we call another function, which is a..

128
00:10:20,900 --> 00:10:25,300
Aliens that will take the role of fixing this problem.

129
00:10:25,540 --> 00:10:34,480
So here we have image that this one and the earliest OK, now, after resizing the image, we have to

130
00:10:34,480 --> 00:10:35,990
convert it to an image.

131
00:10:36,010 --> 00:10:37,740
After that, we will put it in a label.

132
00:10:37,800 --> 00:10:40,180
It will see how it looks now.

133
00:10:41,700 --> 00:10:43,400
There is always the same problem.

134
00:10:45,400 --> 00:10:52,390
So yes, yes, I know us because we decided, but we here we have always the first image, which is

135
00:10:52,390 --> 00:11:00,750
this one, but now we need to convert this image, which is imagery sized like this, because I, I,

136
00:11:00,920 --> 00:11:05,810
I, I just I left just the name of the first image, which is this one.

137
00:11:06,130 --> 00:11:08,980
So in this case, we will always put the first image.

138
00:11:08,980 --> 00:11:12,910
But now in this case we want to convert the resized image.

139
00:11:12,910 --> 00:11:13,630
We see this one.

140
00:11:13,760 --> 00:11:15,830
OK, so now it will work.

141
00:11:16,300 --> 00:11:16,870
Yes.

142
00:11:17,320 --> 00:11:18,790
As you can see here, our image.

143
00:11:18,790 --> 00:11:25,540
But there is always this problem of the ways because we have we have the image is the image is a PNG.

144
00:11:25,540 --> 00:11:27,970
But there is always this problem of this white.

145
00:11:27,970 --> 00:11:29,670
But we need we can change it.

146
00:11:29,680 --> 00:11:31,660
We have just to go here in the label.

147
00:11:32,890 --> 00:11:38,410
We change the background and we put it at the same background that we have here, which is this one,

148
00:11:39,220 --> 00:11:48,610
as you can see here, we did right when we put this horrible background that has this this very bit

149
00:11:48,610 --> 00:11:54,880
of the color, because if we didn't do that, we have always in every or in each step that we need to

150
00:11:54,880 --> 00:12:00,700
change the background, we have to write this code, etc. But here, if we put it in a variable, we

151
00:12:00,700 --> 00:12:03,110
have just to type the name of the variable.

152
00:12:03,150 --> 00:12:04,180
OK, it will be easy.

153
00:12:04,390 --> 00:12:07,480
I think now we will go here.

154
00:12:07,810 --> 00:12:11,680
You can see that there is no white color in the background.

155
00:12:12,010 --> 00:12:18,150
So we stop just here and in the next video we continue creating our application.

156
00:12:18,370 --> 00:12:20,110
So I see you that by.
