|
-
Dec 30th, 2016, 08:37 PM
#1
Thread Starter
Member
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 bool[] imageToBinaryArray(System.Drawing.Image imageIn)
{
MemoryStream ms = new MemoryStream();
bool[] arr = new bool[50000000];
int i =0;
imageIn.Save(ms, System.Drawing.Imaging.ImageFormat.Bmp);
BitArray bitarray = new BitArray(ms.ToArray());
foreach (bool item in bitarray)
{
arr[i] = item;
i++;
}
return arr;
}
How to receive the value returned from function imageToBinaryArray in textbox1 ?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|