How to convert image to binary and get result in text box
I need to convert image to binary and get result in text box .Image found in path D:/person.jpg
i using the following function :
public ArrayList imageToBinaryArray1(System.Drawing.Image imageIn)
{
MemoryStream ms = new MemoryStream();
byte[] arr = new byte[50000000];
ArrayList al = new ArrayList();
imageIn.Save(ms, System.Drawing.Imaging.ImageFormat.Bmp);
arr= ms.ToArray();
foreach (byte item in arr)
{
al.Add(Convert.ToString(item, 2));
}
return al;
}
How to receive the value returned from function imageToBinaryArray1 in textbox1 ?
I work in c# windows form c#