Click here to Skip to main content
Rate this: bad
good
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 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 1:19am

1 solution

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

Solution 1

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 at 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
0 Sergey Alexandrovich Kryukov 8,438
1 OriginalGriff 6,491
2 Peter Leow 3,567
3 Zoltán Zörgő 3,326
4 Richard MacCutchan 2,397


Advertise | Privacy | Mobile
Web01 | 2.8.150123.1 | Last Updated 27 Sep 2012
Copyright © CodeProject, 1999-2015
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