![]() |
Bildschirm nach Farbe absuchen
Huhu!
Wie kann man in Delphi den Bildschirm (bzw. einen Bereich) nach einer Farbeabsuchen und dann soll die Funktion nur einen Boolean Wert zurückgeben! (Mehr nicht! :)) THX Robz :firejump: |
Re: Bildschirm nach Farbe absuchen
z.B. so:
Delphi-Quellcode:
Aufrufen kannst du es z.B. dann so:
function FindPixel(DC: HDC;left, top, width, height: word; color: COLORREF): boolean;
var x,y: integer; begin for x := left to left + width do for y := top to top + height do if GetPixel(dc, x, y) = color then begin result := true; exit; end; result := false; end;
Delphi-Quellcode:
if FindPixel(canvas.Handle, 0, 0, 100, 100, RGB(255,0,0)) then ...
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 03:19 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz