请问jpg 格式的图像能淡入淡出吗(10分)

  • 主题发起人 主题发起人 国色天香
  • 开始时间 开始时间

国色天香

Unregistered / Unconfirmed
GUEST, unregistred user!
我好急呀 ,谁能写个演示给我 ,我感激不尽阿 ,我的邮件是 talltree@medsay.com ,要多少分给多少分阿
 
淡入淡出是什麼意思呀?
 
参考bmp的啊,很简单的,
 
可转化为Bmp,可参考www.efg2.com
 
procedure Fade(DHd,x,y,width,height,SHd,Sx,Sy:integer);
type ByteArray=array[0..0] of Byte;
SIntArray=Array[0..0] of SmallInt;
var Count,i,step : Integer;
DImg : TBitmap;
PDbit,PSbit : ^byteArray;
PDif : ^SIntArray;
begin
DImg:=TBitmap.Create;
Count:=Height*Width*3;
DImg.PixelFormat:=pf24bit;
DIMg.Width:=Width;
DImg.Height:=Height;
GetMem(PSbit,Count);
GetMem(PDbit,Count);
GetMem(PDif,Count*2);
BitBlt(DImg.Canvas.Handle,0,0,Width,Height,DHD,x,y,SRCCOPY);
Getbitmapbits(DImg.Handle,Count,PDBit);
BitBlt(DImg.Canvas.Handle,0,0,Width,Height,SHD,Sx,Sy,SRCCOPY);
Getbitmapbits(DImg.Handle,Count,PSBit);
For i:=0 to Count-1 do
PDif^:=(PSbit^-PDbit^);
for Step:=1 to 15 do
begin
For i:=0 to Count-1 do
PSbit^:=PDbit^+(Pdif^*Step) shr 4;
SetBitmapBits(DImg.handle,Count,PSbit);
BitBlt(DHD,x,y,Width,Height,DImg.Canvas.Handle,0,0,SRCCOPY);
sleep(100);
End;
BitBlt(DHD,x,y,Width,Height,SHD,SX,SY,SRCCOPY);
FreeMem(PDif,Count*2);
FreeMem(PSBit,Count);
FreeMem(PDBit,Count);
DImg.Free;
end;

 
后退
顶部