Salut,
je suis entrain de développer une application qui capture une image de la webcam et affiche cette image dans un pictureBox, je veux que chaque image prise soit afficher dans un nouveau pictureBox.
comment faire ceci?
voiçi mon essai:
j'ai l'erreur:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42 Image[] tabImage = null; int i; private void btnCapt_Click_1(object sender, EventArgs e) { myPlayer.SoundLocation = appPath + "\\camera.wav"; myPlayer.Play(); listView1.Items.Clear(); imageList1.Images.Clear(); current = (Image)video.Clone(); try { if (current == null) { } else { // string fileName = System.IO.Path.Combine(filepath, X + ".bmp"); // current.Save(filepath + "\\picture" + X + ".bmp", System.Drawing.Imaging.ImageFormat.Bmp); // current.Save(fileName); // picture1.Image = current; PictureBox pict = new PictureBox(); pict.Image = current; tabImage[i] = pict.Image; X++; } current = null; } catch (Exception ee) { MessageBox.Show(ee.Message); } }
Pouvez vous m'aider? merci
Code : Sélectionner tout - Visualiser dans une fenêtre à part Object reference not set to an instance of an object
Partager