Autor Beitrag
Phantom1
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 390



BeitragVerfasst: Sa 30.04.05 09:18 
hi,

hab noch einen großen Fehler gefunden und zwar wurden die dunklen Farben (auch graufarben) komplett falsch dargestellt. Komisch das das niemanden aufgefallen ist :shock:

Hier der wichtigste Codeteil:
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:
procedure TForm1.Button1Click(Sender: TObject);
var
  x, h, s, v: Integer;
  p: PRGBQuad;
begin
  with Image1.Picture do begin
    //BmpGBlur(Bitmap, 1);
    Bitmap.PixelFormat:=pf32bit;
    p:=Bitmap.ScanLine[Bitmap.Height-1];
    for x:=1 to Bitmap.Width*Bitmap.Height do begin

      RGBQuadToHSV(p^, h, s, v);

      if (s<50) or (v<50) then begin
        if v>100 then
          p^:=RGBtoRGBQuad(255, 255, 255) // White
        else
          p^:=RGBtoRGBQuad(0, 0, 0); // Black
      end else
        case h of
             0..30: p^:=RGBtoRGBQuad(255,   0,   0); // Red
            31..90: p^:=RGBtoRGBQuad(255, 255,   0); // Yellow
           91..150: p^:=RGBtoRGBQuad(  0, 255,   0); // Green
          151..210: p^:=RGBtoRGBQuad(  0, 255, 255); // Cyan
          211..270: p^:=RGBtoRGBQuad(  0,   0, 255); // Blue
          271..330: p^:=RGBtoRGBQuad(255,   0, 255); // Magenta
          331..360: p^:=RGBtoRGBQuad(255,   0,   0); // Red
        end;

      Inc(p);
    end;
  end;
  Image1.Repaint;
end;

MfG
Phantom1


Zuletzt bearbeitet von Phantom1 am Sa 30.04.05 17:10, insgesamt 1-mal bearbeitet
GTA-Place
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
EE-Regisseur
Beiträge: 5248
Erhaltene Danke: 2

WIN XP, IE 7, FF 2.0
Delphi 7, Lazarus
BeitragVerfasst: Sa 30.04.05 10:30 
Mein 1. Versuch. Muss noch ein bisschen rumprobieren.
Einloggen, um Attachments anzusehen!
_________________
"Wer Ego-Shooter Killerspiele nennt, muss konsequenterweise jeden Horrorstreifen als Killerfilm bezeichnen." (Zeit.de)
Phantom1
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 390



BeitragVerfasst: Sa 30.04.05 17:46 
user profile iconGTA-Place hat folgendes geschrieben:
Mein 1. Versuch. Muss noch ein bisschen rumprobieren.

Nutzt du HLS oder HSV? sieht eher nicht so aus oder?

MfG
Phantom1
GTA-Place
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
EE-Regisseur
Beiträge: 5248
Erhaltene Danke: 2

WIN XP, IE 7, FF 2.0
Delphi 7, Lazarus
BeitragVerfasst: Sa 30.04.05 17:51 
Keins von beidem ^^

_________________
"Wer Ego-Shooter Killerspiele nennt, muss konsequenterweise jeden Horrorstreifen als Killerfilm bezeichnen." (Zeit.de)
GTA-Place
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
EE-Regisseur
Beiträge: 5248
Erhaltene Danke: 2

WIN XP, IE 7, FF 2.0
Delphi 7, Lazarus
BeitragVerfasst: Do 05.05.05 10:48 
[OT]Versuche gerade einen Roboter zu basteln, der

1. durchs Zimmer läuft,
2. bei Kollision Daten an das Programm sendet und
3. das Programm dann ein Bild des Zimmer zeichnet.

So soll dann der Roboter wissen wie am besten von einer zur anderen Stelle im Zimmer kommt.[/OT]

_________________
"Wer Ego-Shooter Killerspiele nennt, muss konsequenterweise jeden Horrorstreifen als Killerfilm bezeichnen." (Zeit.de)
F34r0fTh3D4rk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5285
Erhaltene Danke: 29

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: Do 05.05.05 11:08 
lol GTA, du auch ? :lol:

Ich brauch aber nur noch nen gescheiten sender, weil kabel suckt 8)
GTA-Place
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
EE-Regisseur
Beiträge: 5248
Erhaltene Danke: 2

WIN XP, IE 7, FF 2.0
Delphi 7, Lazarus
BeitragVerfasst: Do 05.05.05 11:15 
Wieso, du auch? :)

Ich hab nen Infarot-Sender (alles von LegoMindstorms)
Lass uns in ICQ weiterreden :)

_________________
"Wer Ego-Shooter Killerspiele nennt, muss konsequenterweise jeden Horrorstreifen als Killerfilm bezeichnen." (Zeit.de)