2016-04-08

Convert Bitmap to Byte Array

Found this short routine.

public static byte[] ImageToByte(Image img)
{
    ImageConverter converter = new ImageConverter();
    return (byte[])converter.ConvertTo(img, typeof(byte[]));
}

No comments:

Post a Comment