Display image in WebBrowser control without access to external files

I am using a C # WebBrowser control in an application to display HTML. All data comes from the database, so I create a full page with Inline-CSS in memory and send it to the browser.

But now I want to support images, which seems to be a problem, because I do not want to store images on my hard drive, even in the Temp Directory. I know data: URI Scheme , but that seems too limited.

Interesting: can I somehow use JavaScript to dynamically create an image, given a stream of bytes, essentially mirroring the data: Schema using JavaScript? Or is there another way to display images, i.e. using GDI +?

I can make some assumptions regarding the images, if necessary, that is, I can force the user to specify the width and height, if necessary, but I can’t actually force the position, this is HTML in the end. I can also force all images to be in a specific format, basically everything that could help with this.

Edit: Can I use something like VML to display Bitmap data? I cannot use Canvas or SVG as it seems (both are not supported in IE and therefore in MSHTML?)

Edit 2: VML will work, but CPU utilization is crazy. This way I will either create a web server for working with files (e.g. cassini), or try the Silverlight approach in my other question.

+1
source share
2 answers

, -, . System.Net.HttpListener, . , ...

+2

img-tag . , , base64-encode src.

. og google html embed image .

+2

All Articles