I think you need to close the
MemoryStream
after using it:
using (MemoryStream ms = new MemoryStream(image.RawData);)
{
BMP = new Bitmap(image.Image);
}
I would also take a look at:
DataImage image = DataImage.TryParse(student[0].path);
As I don't have your source code, I can not tell what is happening there ...