Delphi-PRAXiS
Seite 3 von 3     123   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Object-Pascal / Delphi-Language (https://www.delphipraxis.net/32-object-pascal-delphi-language/)
-   -   Delphi Farbcodes (https://www.delphipraxis.net/10908-farbcodes.html)

F.W. 2. Nov 2003 16:04

Re: Farbcodes
 
So sieht mein Code aus:
Delphi-Quellcode:
var
 X, Y: Integer;
 S: String;
begin
 for Y := 0 to Image1.Height-1 do
     ListBox1.Items.Add('');
 G.MaxValue := Image1.Height-1;
 for Y := 0 to Image1.Height-1 do begin
     G.Progress := Y;
     S := '';
     for X := 0 to Image1.Width-1 do begin
         Insert(ColorToHex(Image1.Canvas.Pixels[X, Y]), S, Length(S)-1);
     end;
     ListBox1.Items[Y] := S;
 end;
end;
Eine Zeile von einem 10x10 Pixel Schwarzweißbild:
$000000$00FFFFFF$00000000$00FFFFFF$00000000$00FFFF FF$00000000$00FFFFFF$00000000$00FFFFFF00
Habe ich vielleicht einen Fehler bei Insert, ich konnte nicht finden.

F.W. 6. Nov 2003 15:12

Re: Farbcodes
 
Ich habe die Insert Methode geändert und jetzt geht alles.

Danke!


Alle Zeitangaben in WEZ +1. Es ist jetzt 14:34 Uhr.
Seite 3 von 3     123   

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz