eloberg
January 27th, 2003, 08:20 AM
I have an array of gray level bytes I want to show on screen. In order to do that I use Stream and Image classes like the following:
Stream strm;
Image img;
Graphics grfx;
strm.Write(pByteArray,0,nSize);
img = Image.FromStream(strm);
grfx.DrawImage(0,0,width,height);
But I get an error saying:
Use of unassigned local variable strm in the statement
img = Image.FromStream(strm);
What have I done wrong?
Stream strm;
Image img;
Graphics grfx;
strm.Write(pByteArray,0,nSize);
img = Image.FromStream(strm);
grfx.DrawImage(0,0,width,height);
But I get an error saying:
Use of unassigned local variable strm in the statement
img = Image.FromStream(strm);
What have I done wrong?