Board index » delphi » Analyzing web page pixels

Analyzing web page pixels


2005-05-05 05:39:08 AM
delphi179
Hello there,
I need to write a program that "analyze" special section of web site and read the color of specific pixels in this area. When these pixels changing I need to action.
I thought that the best way is to use TWebBrowser componet. But how can I "read" it is pixels ?? Please help !
Thanks and regards,
Ofer Leshem
 
 

Re:Analyzing web page pixels

Try this:
unit ClientCanvas;
interface
uses
Graphics, Windows;
type
TClientCanvas = class(TCanvas)
private
FDC: HDC;
FWND: HWND;
function GetWidth:Integer;
function GetHeight:Integer;
public
constructor Create(Wnd: HWND);
destructor Destroy; override;
published
property Width: Integer read GetWidth;
property Height: Integer read GetHeight;
end;
implementation
function TClientCanvas.GetWidth:Integer;
var
R: TRect;
begin
GetClientRect(FWND, R);
Result:= R.Right;
end;
function TClientCanvas.GetHeight:Integer;
var
R: TRect;
begin
GetClientRect(FWND, R);
Result:= R.Bottom;
end;
constructor TClientCanvas.Create(Wnd: HWND);
begin
inherited Create;
FWND:= Wnd;
FDC:= GetDC(FWND);
Handle:= FDC;
end;
destructor TClientCanvas.Destroy;
begin
Handle:= 0;
ReleaseDC(FWND, FDC);
inherited Destroy;
end;
"Ofer Leshem" <XXXX@XXXXX.COM>writes
Quote

Hello there,

I need to write a program that "analyze" special section of web site and read
the color of specific pixels in this area. When these pixels changing I need to
action.
Quote

I thought that the best way is to use TWebBrowser componet. But how can I
"read" it is pixels ?? Please help !

Thanks and regards,
Ofer Leshem