Search code examples
c#imagearraysmemorystreamsystem.drawing.imaging

passing the right BytesArray into the MemoryStream for Image


there a way to determine that I am passing the right byte array to the MemoryStream if I want to create an Image out of byte array.

MemoryStream mStream = new MemoryStream();
mStream.Write(byteArray, 0, byteArray.Lenth);
Image imgObj = Image.FromStream(mStream);

How can I, if possible Correct the byteArray that it is a valid byteArray for an Image?


Solution

  • here's the answer Image Processing for Dummies with C# and GDI+

    OT: i don't know how to put links on comments so I put it in the answers.