淡入浅出!
不知道,参考一下下面的例子!!!!垂直交错和百叶窗效果procedure TForm1.FormActivate(Sender: TObject);  //百叶窗效果var  newbmp:Tbitmap;  i,j,bmpheight,bmpwidth:integer;  xgroup,xcount:integer; begin  IMAGE1.Picture.LoadFromFile('C:\AA.BMP');  newbmp:=Tbitmap.Create ;  newbmp.Width :=image1.Width ;  newbmp.Height :=image1.Height ;  bmpheight:=image1.Height ;  bmpwidth:=image1.Width ;  xgroup:=20;   //16  xcount:=bmpheight div xgroup;  for i:=0 to xcount do  for j:=0to xgroup do  begin    newbmp.Canvas.CopyRect(rect(0,xcount*j+i-1,bmpwidth,xcount*j+i),image1.Canvas,rect(0,xcount*j+i-1,bmpwidth,xcount*j+i));    //form3.Canvas.Draw (image1.Top  ,image1.Left  ,newbmp);    form1.Canvas.Draw (0  ,0,newbmp);    application.ProcessMessages ;  end;    newbmp.Free  ;end;//////////////////////////////////////////////////垂直交错procedure TForm1.Timer1Timer(Sender: TObject);var  newbmp:Tbitmap;  i,j,bmpheight,bmpwidth:integer;begin  timer1.Interval :=3000;  newbmp:=Tbitmap.Create ;  newbmp.Width :=image1.Width ;  newbmp.Height :=image1.Height ;  bmpheight:=image1.Height ;  bmpwidth:=image1.Width ;  i:=0;  while i<=bmpheight do  begin    j:=i;    while j>0 do    begin      newbmp.Canvas.CopyRect(rect(0,j-1,bmpwidth,J),image1.Canvas,rect(0,bmpheight-i+j-1,bmpwidth,bmpheight-i+j));      newbmp.Canvas.CopyRect(rect(0,bmpheight-j,bmpwidth,bmpheight-j+1    ),image1.Canvas,rect(0,i-j,bmpwidth,i-j+1));      j:=j-2;    end;    form1.Canvas.Draw (image1.Top  ,image1.Left  ,newbmp);    i:=i+4;//2  end;    application.ProcessMessages ;    newbmp.Free  ;end;

解决方案 »

  1.   

    你看看这段代码,好像很占用系统资源啊!不用谢!interfaceuses
      Windows, WinProcs, Messages, Classes, Graphics, Controls,
      Forms, Dialogs, StdCtrls, ExtCtrls;type
      TForm1 = class(TForm)
        Image1: TImage;
        Button1: TButton;
        Button2: TButton;
        Image2: TImage;
        procedure Button1Click(Sender: TObject);
        procedure Button2Click(Sender: TObject);
        procedure FormCreate(Sender: TObject);
      private
        { Private-Deklarationen }
      public
        { Public-Deklarationen }
      end;var
      Form1: TForm1;implementation{$R *.DFM}
    procedure TForm1.Button1Click(Sender: TObject);
    var
      i,j,k,r,g,b: integer;
      newbmp:TBitmap;
      bmpheight,bmpwidth:integer;
      const maxstep=10;
    begin
       newbmp:=tbitmap.Create;
       newbmp.Width:=image1.width;
       newbmp.height:=image1.height;
       bmpheight:=image1.height;
       bmpwidth:=image1.width;
       Screen.Cursor := crHourGlass;
       image1.visible:=false;
       for k:=0 to maxstep do
       begin
           with newbmp.canvas do
             for i:=0 to bmpwidth do
                for j:=0 to bmpheight do
                  begin
                    r:=k*(getrvalue(image1.canvas.pixels[i,j]))div maxstep;
                    g:=k*(getgvalue(image1.canvas.pixels[i,j]))div maxstep;
                    b:=k*(getbvalue(image1.canvas.pixels[i,j]))div maxstep;
                    pixels[i,j]:=RGB(r,g,b);
                  end;
         image2.canvas.draw(0,0,newbmp);
         image2.update;
       end;
       Screen.Cursor := crDefault;
    end;procedure TForm1.Button2Click(Sender: TObject);
    begin
       image2.visible:=false;
       image1.visible:=true;
    end;procedure TForm1.FormCreate(Sender: TObject);
    begin
    Image1.Picture.LoadFromFile('e:\1.bmp');
    end;end.
      

  2.   

    lyhold(让你飞)说的可以啊
    非要用浅出
      

  3.   

    淡出:
    while frm_face.AlphaBlendValue >10 do
      begin
         frm_face.AlphaBlendValue := frm_face.AlphaBlendValue-10;
      end
    截取了片断(是启动页面的)
    嘻嘻
      

  4.   

    多些各位指点!当我的问题是对于jpeg图片!可不可以不转成bmp?
      

  5.   

    有没有其他办法呢?bmp对资源的开销有点大!
      

  6.   

    easy!
    试一下这个api:AnimateWindow,用法看msdn
      

  7.   

    谁有例子呀?要jpg的!谢谢!!!