Hi,

I'm grabbing a favicon from a website and add it to a tab.
Does anyone know how to scale it? Some of the favicons are larger then 16*16, which makes it a big image on the tab.

My code to grab it:
vb.net Code:
  1. For Each element As Gecko.GeckoElement In xGecko.Document.DocumentElement.GetElementsByTagName("link")
  2.                 If element.GetAttribute("rel").ToLower = "shortcut icon" Then
  3.                     result = element.GetAttribute("href")
  4.                     Exit For
  5.                 End If
  6.             Next
  7.             Try
  8.                 Dim WebClient As New WebClient
  9.                 Dim MS As New MemoryStream(WebClient.DownloadData(result))
  10.                 Dim favicon As New Icon(MS)
  11.  
  12.                 web_tab.SelectedTab.Icon = favicon