Click here to Skip to main content
Sign Up to vote bad
good
Dear Guys,
 
I am really in a trouble.I need your help.I am creating an interface from a OCR scanner with an ASP.net project.For that i am using a java applet to access the scanner locally and process the document.I am able to process the document and pass the information to the java script in the ASP page.But image i am transferring as byte[].I am not able convert the byte[] from the java script to image in ASP.net page.How can i do that.
Posted 27 Sep '12 - 0:19


1 solution

Hi,
 
Are you streaming just the bytes directly from applet to javascript.If so you'll not be able to directly display the image.
 
Your options are,from the applet send the base64 encoded form of image to javascript.Post the base64 to the server and then use response.BinaryWrite to send back it as image and display it.
 
Response.ContentType = "image/gif"
Response.BinaryWrite(byteStream)
 
If you are able to modify the applet do the same thing as above instead of transferring the image to javascript.
  Permalink  
Comments
muhammed_k - 28 Sep '12 - 10:42
Thankyou Dude, Its done i transfer the base64 encoded string to the javascript its working fine. Thank you ones more.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 OriginalGriff 178
1 Tadit Dash 144
2 Santhosh G_ 140
3 Sergey Alexandrovich Kryukov 134
4 Espen Harlinn 120
0 Sergey Alexandrovich Kryukov 10,348
1 OriginalGriff 7,965
2 CPallini 4,241
3 Rohan Leuva 3,522
4 Maciej Los 3,184


Advertise | Privacy | Mobile
Web02 | 2.6.130523.1 | Last Updated 27 Sep 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid