hi guys, hope someone can help me.
i got a webcam which takes 2 snapshots per second (every 500ms take the snapshot) and overwriting the same file .jpg
i got a algorithm which get the image from file every 800milliseconds.
sometimes less than one minute the error out of memory shows.
I figured out that the memory is not actually out, since i was watching the memory available in task manager.
I tried to work this algorithm without the webcam, i mean reading the same image every 800ms and it never run out of memory.
Dim fileName as string
Dim pimage as Image;
fileName="c:\photo002.jpg";
if (File.Exist(fileName))
pimage=Image.FromFile(fileName); 'out of memory line (i did only a try catch with this line in specific and the problem shows here)
...do something
pimage.dispose();
End if
Thanks for help!
i got a webcam which takes 2 snapshots per second (every 500ms take the snapshot) and overwriting the same file .jpg
i got a algorithm which get the image from file every 800milliseconds.
sometimes less than one minute the error out of memory shows.
I figured out that the memory is not actually out, since i was watching the memory available in task manager.
I tried to work this algorithm without the webcam, i mean reading the same image every 800ms and it never run out of memory.
Dim fileName as string
Dim pimage as Image;
fileName="c:\photo002.jpg";
if (File.Exist(fileName))
pimage=Image.FromFile(fileName); 'out of memory line (i did only a try catch with this line in specific and the problem shows here)
...do something
pimage.dispose();
End if
Thanks for help!