Autor Beitrag
Calyptus
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 386

Win Xp Prof
D3, D6 Pers, D7 Ent
BeitragVerfasst: Di 14.12.04 21:57 
Ich möchte meinem Panel die Farbe geben die der Pixel 200,300 von einem Image hat. In dem Image wurde ein Bitmap geladen.
Ich dachte an so was, aber da wird das Panel immer Schwarz:

ausblenden Delphi-Quelltext
1:
Panel1.Color := GetPixel(Image1.Picture.Bitmap.Handle, 200, 300);					


Ich weis auch nicht genau welches Handle ich nehmen muss.

_________________
Luft- und Raumfahrtechnik an der Uni Stuttgart
AXMD
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 4006
Erhaltene Danke: 7

Windows 10 64 bit
C# (Visual Studio 2019 Express)
BeitragVerfasst: Di 14.12.04 22:03 
ausblenden Delphi-Quelltext
1:
Panel1.Color := Image1.Picture.Bitmap.Pixels[200, 300];					


müsste gehen, ist aber ziemlich lahm. Ansonsten empfehle ich Scanline.

AXMD
Calyptus Threadstarter
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 386

Win Xp Prof
D3, D6 Pers, D7 Ent
BeitragVerfasst: Di 14.12.04 22:13 
Hmm da kommt:
ausblenden Quelltext
1:
[Fehler] Unit1.pas(29): Undefinierter Bezeichner: 'Pixels'					


Und wie genau geht das mit ScanLine? Ich tscheck des Delphi Help Beispiel net :?:

//Edit: Ok. jetzt hab ichs :-)

_________________
Luft- und Raumfahrtechnik an der Uni Stuttgart
Basti
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 345

Windows Vista
D2005 Pers, D7 Pers
BeitragVerfasst: Sa 18.12.04 14:16 
AXMD hat folgendes geschrieben:
ausblenden Delphi-Quelltext
1:
Panel1.Color := Image1.Picture.Bitmap.Pixels[200, 300];					

Falsch ;)
Zitat:
Panel1.Color := Image1.Picture.Bitmap.Canvas.Pixels[200, 300];

_________________
Der Computer ist die logische Weiterentwicklung des Menschen: Intelligenz ohne Moral.