Bhavesh Vankar

Bhavesh Vankar

  • 766
  • 1.1k
  • 88.2k

image to binary

Mar 18 2021 10:47 AM
when i use below code to convert image1.ImageUrl into binary it will work fine. 
 
  1. MemoryStream ms = new MemoryStream();  
  2. byte[] imgtobinary = new byte[ms.Length];  
  3. ms.Position = 0;  
  4. ms.Read(imgtobinary, 0, (int)ms.Length);  
  5. ms.Read(imgtobinary, 0, imgtobinary.Length);  
but when i use below code to convert image1.ImageUrl into binary it is not working and page is not responding anthing no generate any error and response. 
what should i do for this ?
 
i want to convert image into binary which is captured and display on image control by webcam.  

Answers (2)