GetElementImage

Returns the image of the specified element.

Syntax

function GetElementImage(aElement: TCSElement): TCSImage;

Parameters

  • aElement
    • type: TCSElement
    • functions: element, the image of which is necessary to obtain

Returned value

  • type: TCSImage
  • functions: image of the specified element

Notes

Examples

  1. //Loading page with image (in this case - a captcha)
    LoadURI('http://www.google.com/recaptcha/learnmore');
    //Obtain an element that contains an image
    var ImageElement:=GetElement('img',0,['src'],['google.com/recaptcha/']);
    //Obtain an image of the element
    var Image:=GetElementImage(ImageElement);
    //Output to the log  pixel color with coordinates (10,10)
    Log(IntToStr(Image.Pixels[10,10]));