Autor Beitrag
G-McKree
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 178



BeitragVerfasst: Mi 14.05.03 19:14 
ich hab folgendes Problem:
ich hab versucht die durchsichtige Farbe eines TBitmap in nem TImage zu ändern und zwar so:
ausblenden Delphi-Quelltext
1:
Image1.Picture.Bitmap.TransparentColor:= $00FFFFFF (Weiss)					

hat aber nich gefunzt. Ne Ahnung wo das Prob is?

Ausserdem wüsste ich gern ob man ne TBitmap (oder auch das TImage) drehen kann.

Moderiert von user profile iconTino: Delphi-Tags hinzugefügt.
Criz
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 18

Win XP Prof.
D6 Ent, D7 Ent
BeitragVerfasst: Do 15.05.03 01:01 
Hallo,

ich habe momentan zwar grad kein Delphi installiert, aber
soweit ich mich erinnere, musst du erst
ausblenden Delphi-Quelltext
1:
image1.transparent := true;					

setzen.

Zum Drehen benutze ich selbstgeschriebenen Code:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
for x := 0 to image1.picture.width do begin
  for y := 0 to image1.picture.height do begin
    image2.canvas.pixels[x,y] := image1.canvas.pixels[y,x];
  end;
end;

Wobei image2 ein temporäres Image ist.

Wie gesagt: Ich kann nicht überprüfen, ob's stimmt => keine Garantie
G-McKree Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 178



BeitragVerfasst: Do 15.05.03 12:58 
Criz hat folgendes geschrieben:
Hallo,

ich habe momentan zwar grad kein Delphi installiert, aber
soweit ich mich erinnere, musst du erst
ausblenden Delphi-Quelltext
1:
image1.transparent := true;					

setzen.


hab ich ja gemacht, aber delphi nimmt als transparente farbe immer die farbe des 1. pixels
Kostja
Hält's aus hier
Beiträge: 11



BeitragVerfasst: So 18.05.03 10:23 
Kann sein dass ich mich irre, aber wird weiß nicht so angegeben:
$FFFFFF ???
maximus
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 896

Win XP, Suse 8.1
Delphi 4/7/8 alles prof
BeitragVerfasst: Mo 19.05.03 11:51 
($00FFFFFF = $FFFFFF) = true :wink:

PS: und von drehen kann beim algo oben ja nicht die rede sein...ok in 90° schritten, aber das ist eher ein springen. Da würd ich dann auch 'scanline' benutzen -> ist 100x schneller.

Mit den compos von Graphix32 kann man rotieren alpha, filtering etc machen

_________________
mfg.
mâximôv