Autor Beitrag
>M@steR<
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 288
Erhaltene Danke: 3



BeitragVerfasst: So 12.10.08 14:43 
Gelöscht


Zuletzt bearbeitet von >M@steR< am Di 17.09.13 02:05, insgesamt 1-mal bearbeitet
platzwart
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1054
Erhaltene Danke: 78

Win 7, Ubuntu 9.10
Delphi 2007 Pro, C++, Qt
BeitragVerfasst: So 12.10.08 15:14 
hi,

nimm lieber ein TBitMap32 oder TImage32 aus der Graphics32. Da dürfte die Geschwindigkeit um Faktor 200 steigen. Dann brauchst du auch nicht mehr mit den einzelnen Farbwerten herumzuhantieren...


Zuletzt bearbeitet von platzwart am So 12.10.08 17:45, insgesamt 2-mal bearbeitet
>M@steR< Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 288
Erhaltene Danke: 3



BeitragVerfasst: So 12.10.08 15:19 
Gelöscht


Zuletzt bearbeitet von >M@steR< am Di 17.09.13 02:05, insgesamt 1-mal bearbeitet
Boldar
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1555
Erhaltene Danke: 70

Win7 Enterprise 64bit, Win XP SP2
Turbo Delphi
BeitragVerfasst: So 12.10.08 15:20 
Du sollst ja auch eine ganz andere Komponente nehmen!
>M@steR< Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 288
Erhaltene Danke: 3



BeitragVerfasst: So 12.10.08 15:24 
Gelöscht


Zuletzt bearbeitet von >M@steR< am Di 17.09.13 02:06, insgesamt 1-mal bearbeitet
>M@steR< Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 288
Erhaltene Danke: 3



BeitragVerfasst: So 12.10.08 15:36 
Gelöscht


Zuletzt bearbeitet von >M@steR< am Di 17.09.13 02:06, insgesamt 1-mal bearbeitet
uall@ogc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1826
Erhaltene Danke: 11

Win 2000 & VMware
Delphi 3 Prof, Delphi 7 Prof
BeitragVerfasst: So 12.10.08 16:25 
pf24bit für RGB (was du hast)
bzw. pf32bit fpr RGBA

_________________
wer andern eine grube gräbt hat ein grubengrabgerät
- oder einfach zu viel zeit
platzwart
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1054
Erhaltene Danke: 78

Win 7, Ubuntu 9.10
Delphi 2007 Pro, C++, Qt
BeitragVerfasst: So 12.10.08 17:45 
user profile iconplatzwart hat folgendes geschrieben Zum zitierten Posting springen:
hi,

nimm lieber ein TBitMap32 oder TImage32 aus der Graphics32. Da dürfte die Geschwindigkeit um Faktor 200 steigen. Dann brauchst du auch nicht mehr mit den einzelnen Farbwerten herumzuhantieren...




welche komponenten habe ich denn da angesprochen? -> "TBitMap32 oder TImage32 aus der Graphics32"^^


graphics32.org/wiki/
>M@steR< Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 288
Erhaltene Danke: 3



BeitragVerfasst: So 12.10.08 19:37 
Gelöscht


Zuletzt bearbeitet von >M@steR< am Di 17.09.13 02:06, insgesamt 1-mal bearbeitet
>M@steR< Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 288
Erhaltene Danke: 3



BeitragVerfasst: So 12.10.08 21:46 
Gelöscht


Zuletzt bearbeitet von >M@steR< am Di 17.09.13 02:06, insgesamt 1-mal bearbeitet
platzwart
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1054
Erhaltene Danke: 78

Win 7, Ubuntu 9.10
Delphi 2007 Pro, C++, Qt
BeitragVerfasst: So 12.10.08 22:16 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
procedure TForm1.Button1Click(Sender: TObject);
  var x,y:integer;
      line: PColor32Array;
  begin
    for y := 0 to image321.Height -1 do
      begin
        line := image321.Bitmap.scanline[y];
        for x := 0 to image321.Width -1 do
          begin
            if line^[x] = clWhite then 
            if line[x] = clWhite then
              begin
                showmessage('Weiß');
              end;
          end;
      end;
  end;
>M@steR< Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 288
Erhaltene Danke: 3



BeitragVerfasst: So 12.10.08 22:19 
Gelöscht


Zuletzt bearbeitet von >M@steR< am Di 17.09.13 02:06, insgesamt 1-mal bearbeitet
platzwart
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1054
Erhaltene Danke: 78

Win 7, Ubuntu 9.10
Delphi 2007 Pro, C++, Qt
BeitragVerfasst: So 12.10.08 22:45 
kam die zugriffsverletzung in der zeile, die ich markiert hatte? und hast du die markierte gelöscht?
>M@steR< Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 288
Erhaltene Danke: 3



BeitragVerfasst: So 12.10.08 22:47 
Gelöscht


Zuletzt bearbeitet von >M@steR< am Di 17.09.13 02:06, insgesamt 1-mal bearbeitet
platzwart
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1054
Erhaltene Danke: 78

Win 7, Ubuntu 9.10
Delphi 2007 Pro, C++, Qt
BeitragVerfasst: Mo 13.10.08 00:40 
*kristallkugel auspack und reinschau*

... hast ja net vergessen, in die bitmap auch ein bild zu laden? ^^

ansonsten greift er auf eine leere bitmap zu und natürlich gibts dann eine fehlermeldung ;)
Hidden
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2242
Erhaltene Danke: 55

Win10
VS Code, Delphi 2010 Prof.
BeitragVerfasst: Mo 13.10.08 01:03 
Hi,

Ich würde dir empfehlen, ein paar überflüssige Einrückungen wegzulassen. Mag ein bisschen komisch klingen, aber gibt dir wirklich viel an Übersichtlichkeit ;)
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
procedure TForm1.Button1Click(Sender: TObject);
var
  x, y: Integer;
  Line: PColor32Array;
begin
  for y := 0 to image321.Height -1 do begin
    Line := Image321.Bitmap.Scanline[y];
    for x := 0 to Image321.Width -1 do begin
      if Line[x] = clWhite then
        ShowMessage('Weiß');
    end;
  end;
end;


Also 'ne leere Bitmap kann's nicht sein. Wenn er vergessen hätte, sie zu erzeugen, käme die Zugriffsverletzung früher(bei mir jetzt Zeile 6). Und bei Height = 0 würde die for-Schleife null mal ausgeführt..

mfG,

_________________
Centaur spears can block many spells, but no one tries to block if they see that the spell is a certain shade of green. For this purpose it is useful to know some green stunning hexes. (HPMoR)
>M@steR< Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 288
Erhaltene Danke: 3



BeitragVerfasst: Mo 13.10.08 01:14 
Gelöscht