screenshot c code

archel

Client
Регистрация
02.05.2011
Сообщения
175
Благодарностей
22
Баллы
18
Hi

I want to try out c code to take screenshot of pages because the captcha method doesn't work for some sites.
I've got this but doesn't work-seems to get stuck at the "var img= ..." line. Anyone can help?:

HtmlElement he = instance.ActiveTab.FindElementByAttribute("body","fulltag","body","text",0);
int heHeight = Convert.ToInt32(he.GetAttribute("height"));
int heWidth = Convert.ToInt32(he.GetAttribute("width"));
var bitmaps = new List<System.Drawing.Bitmap>();
var text = he.DrawPartToBitmap(0, 10000, heWidth, 0, true);
byte[] imageBytes = Convert.FromBase64String(text);
var ms = new System.IO.MemoryStream(imageBytes, 0, imageBytes.Length);
var img = (System.Drawing.Bitmap)System.Drawing.Image.FromStream(ms);
img.Save(@"C:\images\test.jpg");
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)