5
Answers

How to convert image to binary and get result in text box

ahmed salah

ahmed salah

8y
296
1
I need to convert image to binary and get result in text box .
 
i using the following function :
 
Image found in path D:/person.jpg 
  1. public static byte[] ImageToBinary(string _path)  
  2. {  
  3. FileStream fS = new FileStream(_path, FileMode.Open, FileAccess.Read);  
  4. byte[] b = new byte[fS.Length];  
  5. fS.Read(b, 0, (int)fS.Length);  
  6. fS.Close();  
  7. return b;  
  8. }  
How to receive the value returned from function ImageToBinary in textbox1 ?
 
I work in c# windows form c# 
Answers (5)