Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

converting bitmap to byte array c#

public static byte[] ImageToByte2(Image img)
{
    using (var stream = new MemoryStream())
    {
        img.Save(stream, System.Drawing.Imaging.ImageFormat.Png);
        return stream.ToArray();
    }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #converting #bitmap #byte #array
ADD COMMENT
Topic
Name
6+9 =