Click here to Skip to main content
16,016,750 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how i display a image in web broswer
Posted

1 solution

A web browser displays the content written in HTML markup, not in Java source code. Even if the web browser; or the control being used, is written in Java the web browser would still be looking for a code written in HTML markup. Something like the following DOM tree form,

HTML
<html>
   <head>
      <title>My Photo Viewing Page</title>
   </head>
   <body>
      <img src="some-location-to-image.png"
           alt="Photo didn't load correctly" />
   </img></body>
</html>


This, once loaded as a file (with .html format) would display the image in the browser. The web browser control would take care of rendering, you don't have to worry about it at all.
 
Share this answer
 
v2
Comments
Satyajit Rath@29749 27-Feb-15 2:13am    
i have to fetch the imagefrom device in server
Afzaal Ahmad Zeeshan 27-Feb-15 3:56am    
You can upload the image from the client's machine to the server.

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