Nun, ich habe zwar ein
Fade Out gefunden nicht aber ein
Fade In. Natürlich ist es für die einen unter euch keine Sache sowas kurz umzuschreiben, aber ich krieg einfach nicht raus, was ich ändern muss um aus dem
Fade Out ein
Fade In zu kriegen.
Also, hier der
Fade Out Code:
Delphi-Quellcode:
procedure FadeIn(
const BMP:TImage; Pause:integer) ;
var
BytesPorScan : integer;
w,h : integer;
p : pByteArray;
counter : integer;
begin
{This only works with 24 or 32 bits bitmaps}
If Not (BMP.Picture.Bitmap.PixelFormat
in [pf24Bit, pf32Bit])
then raise exception.create
('
Error, bitmap format not supported.') ;
try
BytesPorScan:=
Abs(Integer(BMP.Picture.Bitmap.ScanLine[1])-
Integer(BMP.Picture.Bitmap.ScanLine[0])) ;
except
raise exception.create('
Error') ;
end;
{Increase the RGB for each single pixel}
for counter:=1
to 256
do
begin
for h:=0
to BMP.Picture.Bitmap.Height-1
do
begin
P:=BMP.Picture.Bitmap.ScanLine[h];
for w:=0
to BytesPorScan-1
do
if P^[w] > 0
then P^[w]:=P^[w]+1;
end;
Sleep(Pause);
BMP.Refresh;
end;
end;
{procedure FadeIn}
Schon im voraus ein Danke an denjenigen/diejenige, der/die mir das kurz umschreibt.
P.S.: Und nein, mit der SuFu fand ich kein
Fade In