Hi,
I created a thread that runs continously that reads a picture from a folder. this picture is being read 50times per second.
I have a camera where the software is set on trigger mode(50ms) it constantly takes a picture and reaplces the old one in the same location.
while i am reading this picture i am getting an IOexception handle: the process cannot access file because it is being used by another process.
My code:
//in the thread
FileStream stream = new FileStream("Filename",filemode.open,fileaccess.read);
Bitmap bm = (Bitmap)Image.FromStream(stream);
stream.Close();
is filestream not the way to go?
//
I created a thread that runs continously that reads a picture from a folder. this picture is being read 50times per second.
I have a camera where the software is set on trigger mode(50ms) it constantly takes a picture and reaplces the old one in the same location.
while i am reading this picture i am getting an IOexception handle: the process cannot access file because it is being used by another process.
My code:
//in the thread
FileStream stream = new FileStream("Filename",filemode.open,fileaccess.read);
Bitmap bm = (Bitmap)Image.FromStream(stream);
stream.Close();
is filestream not the way to go?
//