Click here to Skip to main content
15,901,373 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
in my application i'm using web browser control but i'm not able to display Embedded image
if i pass that content as string input for that control please help me .

my sample code is::
Quote:
string data="<html>\n <head>\n\n <meta http-equiv=\"content-type\" content=\"text/html; charset=ISO-8859-1\">\n "
+"</head>\n <body <img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABkAAAAOECAIAAAB2L2r1AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAgAElEQVR4nOy9\"/></body>\n</html>\n";
HtmlBrowser.DocumentText = data;
HtmlBrowser.BorderStyle = BorderStyle.FixedSingle;
Posted
Comments
Mahesh Bailwal 22-May-13 3:48am    
What is the version of browser as older browser version does no support base64 image.
kiran pericherla 22-May-13 4:34am    
Version 4.0.0.0 i'm using
Prasad Khandekar 22-May-13 17:05pm    
Hello Kiran,

This article will give you more details about data uris. IE-8 onwords it's supported with IE8 having a limitation on size which is restricted to 32768 bytes.

http://css-tricks.com/data-uris/

Regards,
kiran pericherla 24-May-13 8:16am    
Thank you for your Answer.There is any solution to load more then 32768bytes.
Member 12578086 20-Aug-16 7:42am    
how to make reverse process of above problem? i.e. convert image to base64 inline and source will save in database...

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