Click here to Skip to main content
15,891,951 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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

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.
 
Share this answer
 
Comments
muhammed_k 28-Sep-12 10:42am    
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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900