user2942910
user2942910

Reputation: 173

C# Geckofx Browser Image Download

I'm trying to download an image from a page. But it only show (Image Found) if i manually click on right click, i want it to download automatically anyone now a better solution ? Tried

GeckoImageElement img = (GeckoImageElement)wb1.Document.GetElementById("imgcode"); 
if (wb1.CopyImageContents())

MessageBox.Show("done");

if (Clipboard.ContainsImage())

MessageBox.Show("Image Found!!");

Upvotes: 2

Views: 2266

Answers (1)

Tom
Tom

Reputation: 6729

Geckofx contains a SaveImageElement class which may help you. Eg. the following should copy the 'imgcode' img to the clipboard:

wb1.CopyGeckoImageElementToPng(img, 0,0,img.Width,img.Height);

Upvotes: 3

Related Questions