I have an image (in .png format), and I want this picture to convert to binary.
How can this be done using C#?
using System.IO; FileStream fs=new FileStream(Path, FileMode.Open, FileAccess.Read); //Path is image location Byte[] bindata= new byte[Convert.ToInt32(fs.Length)]; fs.Read(bindata, 0, Convert.ToInt32(fs.Length));