Autor Beitrag
jakobwenzel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1889
Erhaltene Danke: 1

XP home, ubuntu
BDS 2006 Prof
BeitragVerfasst: Mo 11.12.06 16:52 
Bei mir siehts genau so aus, nur dasses bei mir ein SpinEdit ist und dann die Konvertierung entfällt und das was bei dir A ist, ist bei mir ein String und wird mit StringToColor konvertiert.

_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes.
Leuchtturm
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1087

Win Vista, Knoppix, Ubuntu
Delphi 7 Pe, Turbo Delphi, C#(VS 2005 Express), (X)HTML + CSS, bald Assembler
BeitragVerfasst: Mo 11.12.06 19:12 
Ich weiß zwar was der Code macht ich habe aber nicht so richtig verstanden warum jetzt das bild erzeugt wird :nixweiss:

_________________
Ich bin dafür verantwortlich was ich sage - nicht dafür was du verstehst.
Heiko
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3169
Erhaltene Danke: 11



BeitragVerfasst: Mo 11.12.06 19:46 
Hallo,

dass ist doch ganz einfach. Und zwar ist jede Zeile der Datei ein BGR-Wert (den du also direkt als Pixel in Delphi verwenden kannst). Da ein Bild normalerweise rechteckig ist suchst du alle möglichen Paare, die die Gesamtpixelanzahl ergibt, also hier die 199*x (weiß die Zahl nimmer) und x*199. Die mit 1*v und v*1 sind sinnlos - dürfte ja klar sein.
Jetzt weißt du, wie groß das Bild ist und zeichnest die Pixel einfach nur noch reihenweise. Mehr steckt nicht dahinter.
delfiphan
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2684
Erhaltene Danke: 32



BeitragVerfasst: Mo 11.12.06 20:11 
@Heiko: Wie kommst du auf BGR?
jakobwenzel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1889
Erhaltene Danke: 1

XP home, ubuntu
BDS 2006 Prof
BeitragVerfasst: Mo 11.12.06 20:26 
Little Endian, steht hier auch schon irgendwo. :lupe:

_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes.
delfiphan
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2684
Erhaltene Danke: 32



BeitragVerfasst: Mo 11.12.06 21:05 
Ich würde mal sagen es ist weder einfach RGB noch BGR sondern abhängig von der Interpretation des Senders/Empfängers. RGB für Windows ist nicht gleich RGB für OpenGl. Die sind genau umgekehrt definiert. Das ist ne Definitionssache.
Verwenden Aliens Intel-Chips, so wurde $BBGGRR als Bytefolge $RR $GG $BB versendet, also RGB.
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: Mo 11.12.06 21:06 
Er kam auf BGR, weil er ScanLine benutzt hat und vergessen hat, dass Scanline mit BGR statts RGB arbeitet ;-).

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



BeitragVerfasst: Mo 11.12.06 21:07 
Jo, ist Geschmackssache, wobei ich mir BGR angewöhnt habe, denn wenn den RGB-Hex-Wert aus Zeichenprogrammen rauskopiert und beim WinEditor in Dezimal umwandelt erhält man das Gegenteil von dem, was man haben möchte ;).