c# bitmap to byte string code example
Example: bitmap to byte array c#
public static byte[] ImageToByteArray(Image img)
{
using (var stream = new MemoryStream())
{
img.Save(stream, System.Drawing.Imaging.ImageFormat.Png);
return stream.ToArray();
}
}