Click here to Skip to main content
12,746,681 members (28,569 online)
Rate this:
Please Sign up or sign in to vote.
See more: ASP.NET Javascript Java
Dear Guys,

I am really in a trouble.I need your help.I am creating an interface from a OCR scanner with an 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 page.How can i do that.
Posted 27-Sep-12 1:19am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1


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"

If you are able to modify the applet do the same thing as above instead of transferring the image to javascript.
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)

    Print Answers RSS
Top Experts
Last 24hrsThis month

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

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100