Hi i have a c# IE automation script and i am trying to retrieve the image from a HTMLImgClass, i cant get the image from cache because its not saved and i cant just resend a request to the src because a new image returns, so i need a way to access the Image in the browsers memory.
captcha_image = (HTMLImgClass)GetElementByPosition("img", 0, ie1);
The object is retreived with the above assignement, which works fine, but i have no idea which of the methods available i can use to get the image.
Thanx for your time
SOLVED For others interested, i solved it this way, i decided to copy the image to clipboard and then save it as a bmp
captcha_image = (HTMLImgClass)GetElementByPosition("img", 0, ie1);
IHTMLImgElement captcha_image1 = (IHTMLImgElement)captcha_image;
IHTMLDocument2 doc = (IHTMLDocument2)wb1.Document;
IHTMLControlRange imgRange = (IHTMLControlRange)((HTMLBody)doc.body).createControlRange();
imgRange.add((IHTMLControlElement)captcha_image1);
imgRange.execCommand("Copy", false, null);
using (Bitmap bmp = (Bitmap)Clipboard.GetDataObject().GetData(DataFormats.Bitmap))
{
bmp.Save(@"C:\skt.bmp");
}