What you are doing is rendering the image as it is rendered by the browser with all the styles. I don't know if this is what your realy want? If you only want to download the image then it is easier to solve it with a web request as described in hte other answers.
If you realy want to render than the first step is to change
Bitmap bmp = new Bitmap(img.width, img.height);
to
Bitmap bmp = new Bitmap(e.OffsetRectangle.Width, e.OffsetRectangle.Height);
Now you get the complete rendered web browser image.
If you want a perfect solution even for big images you also have to scroll around and get the image tile by tile.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…