Grabbing Images from a webpage quickly
<p>I was wondering if someone could give me some guidance here. I'd like to be able to programatically get every image on a webpage as quickly as possible. This is what I'm currently doing: (note that clear is a WebBrowser control)</p>

<pre><code>if (clear.ReadyState == WebBrowserReadyState.Complete)
                {
                    doc = (IHTMLDocument2)clear.Document.DomDocument;
                    sobj = doc.selection;
                    body = doc.body as HTMLBody;
                    sobj.clear();
                    range = body.createControlRange() as IHTMLControlRange;
                    for (int j = 0; j &lt; clear.Document.Images.Count; j++)
                    {
                        img = (IHTMLControlElement)clear.Document.Images[j].DomElement;
                        HtmlElement ele = clear.Document.Images[j];
                        string test = ele.OuterHtml;
                        string test2 = ele.InnerHtml;

                        range.add(img);
                        range.select();
                        range.execCommand("Copy", false, null);
                        Image image = Clipboard.GetImage();
                        if (image != null)
                        {
                            temp = new Bitmap(image);
                            Clipboard.Clear();
                             ......Rest of code ...........
                        }
                   }
           }
</code></pre>

<p>However, I find this can be slow for alot of images, and additionally it hijacks my clipboard. I was wondering if there is a better way?</p>

<p>Thanks</p>
