Autor Beitrag
en!gma
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 378

win xp
delphi 7.0
BeitragVerfasst: Mi 26.01.05 20:22 
hi
also erstmal hoffe ich, dass ich das in die richtige kategorie gepackt hab : )

mein problem ist folgendes:

ich habe eine bmp datei.
darin sind nur die farben schwarz und weiss vorhanden.
nun soll das programm, jeden einzelnen pixel abfragen.
und bei jedem pixel der schwarz ist, soll ein programm ausgeführt werden.
und zwar mit den parametern von der x und der y position von dem pixel, der schwarz ist
und gerade überprüft wurde.

ich hoffe ihr könnt mir (wieder mal) helfen : )

mfg

en!gma
sourcehunter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 482

Win XP | Suse 10.1
Delphi 2005 Pers.
BeitragVerfasst: Mi 26.01.05 20:26 
Mit TBitmap.LoadFromFile laden.
Dann mit TBitmap.Canvas.Pixels[x,y]=clBlack überprüfen.

_________________
Linux und OpenSource rulez!
en!gma Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 378

win xp
delphi 7.0
BeitragVerfasst: Mi 26.01.05 20:28 
und das mach ich am besten mit ner for schleife die alle pixel überprüft oder?
wie muss die for schleife dann aussehen?
oder muss ich dann for schleife in einer for schleife machen?
StefanH
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1144

Win XP
D5 Standard, D7 Pers, D2005 Pers
BeitragVerfasst: Mi 26.01.05 20:29 
ausblenden Ein Kleines Bsp
1:
2:
3:
4:
for w:= 0 to Bitmap.Width do
 for h:= 0 to Bitmap.Height do
  if Bitmap.Canvas.Pixels[w, h] = clBlack then
    somefoo(w, h);


//edit: zu langsam... :roll:

_________________
"Als es noch keine Computer gab, war das Programmieren noch relativ einfach."(Edsger W. Dijkstra)
"Ich bin nicht von Sinnen, sondern ich rede wahre und vernünftige Worte." (Paulus)
en!gma Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 378

win xp
delphi 7.0
BeitragVerfasst: Mi 26.01.05 20:31 
oh das ist es ja schon.
thx : )