-
December 30th, 2016, 08:13 PM
#1
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#
-
December 30th, 2016, 08:48 PM
#2
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?
-
December 30th, 2016, 08:50 PM
#3
Re: How to convert image to binary and get result in text box
-
December 31st, 2016, 03:48 AM
#4
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?
-
December 31st, 2016, 06:35 AM
#5
Re: How to convert image to binary and get result in text box
Can you show me how to do that
-
December 31st, 2016, 12:59 PM
#6
Re: How to convert image to binary and get result in text box
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.
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
|