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 :
Code:
public static byte[] ImageToBinary(string _path)
{
FileStream fS = new FileStream(_path, FileMode.Open, FileAccess.Read);
byte[] b = new byte[fS.Length];
fS.Read(b, 0, (int)fS.Length);
fS.Close();
return b;
}
How to receive the value returned from function ImageToBinary in textbox1 ?
I work in c# windows form c#
Re: How to convert image to binary and get result in text box
What do you want to display in the text box, 0's and 1's?
Re: How to convert image to binary and get result in text box
Re: How to convert image to binary and get result in text box
Have you tried calling ToString () on the byte array and set the text box to the string?
Re: How to convert image to binary and get result in text box
Can you show me how to do that
Re: How to convert image to binary and get result in text box
Quote:
Originally Posted by
ahmed.barbary
Can you show me how to do that
Sure, post the code you have so far that calls the ImageToBinary method.