ahmed salah

ahmed salah

  • 1.6k
  • 530
  • 122.9k

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

Dec 30 2016 7:49 PM
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)