در این ویدئو نحوه اختصاص تصویر موجود در ریسورس به شیء Image از سند HTML در زمان اجرای نرم افزار توضیح داده شده....
Imports System.Runtime.CompilerServices
<Extension>
Public Sub SetImage(ByRef Element As HtmlElement, Image As Bitmap)
Dim formatstr As String = ""
Select Case Image.RawFormat.Guid
Case Imaging.ImageFormat.Bmp.Guid : formatstr = "image/bmp"
Case Imaging.ImageFormat.Icon.Guid : formatstr = "image/Icon"
Case Imaging.ImageFormat.Emf.Guid : formatstr = "image/Emf"
Case Imaging.ImageFormat.Exif.Guid : formatstr = "image/Exif"
Case Imaging.ImageFormat.Gif.Guid : formatstr = "image/Gif"
Case Imaging.ImageFormat.Jpeg.Guid : formatstr = "image/Jpeg"
Case Imaging.ImageFormat.MemoryBmp.Guid : formatstr = "image/MemoryBmp"
Case Imaging.ImageFormat.Png.Guid : formatstr = "image/Png"
Case Imaging.ImageFormat.Wmf.Guid : formatstr = "image/Wmf"
End Select
Dim Buffer As New IO.MemoryStream
Image.Save(Buffer, Image.RawFormat)
Dim SrcStr As String = String.Format("data:{0};base64,{1}", formatstr, Convert.ToBase64String(Buffer.ToArray))
Buffer.Close()
Element.SetAttribute("src", SrcStr)
End Sub