Autor Beitrag
neo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 179



BeitragVerfasst: Fr 27.06.03 20:49 
Hallo!

Hat wer eine Idee wie ich den kompletten Bildschirm (koordinatenweise) nach einer bestimmten Farbe (rgb) abscannen kann?

Dann sollte ich die Koordinaten des Punktes bekommen

Danke!
sCrAPt
Gast
Erhaltene Danke: 1



BeitragVerfasst: Fr 27.06.03 21:02 
Mach doch einen Screenshot und prüfe jeden Pixel :D Canvas kann das ;)

//EDIT: Mein 400ster Beitrag
neo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 179



BeitragVerfasst: Fr 27.06.03 21:08 
Titel: RE.
Danke erstmals.

Doch wie mache ich einen Screenshot?

Muss ich den in eine Datei speichern, oder reicht es den Shot in der Ablage zu lassen??

Danke!
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Sa 28.06.03 00:05 
In den FAQ solltest du entsprechenden Code finden und dann kuck dir mal die Funktion Scanline an.
comes
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 40



BeitragVerfasst: Di 01.07.03 21:52 
Titel: hi!
ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls;

type
  TForm1 = class(TForm)
    Timer1: TTimer;
    procedure Timer1Timer(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

function GetScreenPixelColor(X, Y: Integer): TColor;
var
  DC: hDC;
begin
  DC:=GetDC(0);
  Result:=GetPixel(DC, X, Y);
  ReleaseDC(0, DC);
end;
procedure TForm1.Timer1Timer(Sender: TObject);
var Mausposition: TPoint;
begin
  Mausposition:=Mouse.CursorPos;
  self.Color := GetScreenPixelColor(Mausposition.x, Mausposition.y);
end;

end.


ich hatte das mal geschrieben, is zwar mit der farbe unter der maus, aber das lässt sich sicher modifizieren


gruß, comes
maximus
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 896

Win XP, Suse 8.1
Delphi 4/7/8 alles prof
BeitragVerfasst: Di 01.07.03 22:24 
und ist theoretisch saumässig langsam 8) zumindest wenn man den ganzen bildschirm scannen will.

_________________
mfg.
mâximôv
comes
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 40



BeitragVerfasst: Di 01.07.03 22:25 
das is ja richtig, aber es geht zumindest, und wenn man den screen in bereiche teilt, gehts wieder schneller