for i:=0 to Bitmap1.Width -1 do
  begin
   for y:=0 to Bitmap1.Height-1 do
   begin
    Current:=Bitmap1.ScanLine[y];
    Next:=Bitmap2.ScanLine[y];
    ToDisplay:=Bitmap3.ScanLine[y];
    for z:=0 to i-1 do
     ToDisplay[z]:=Next[z];
    for j:=i to Bitmap1.Width-1 do
     ToDisplay[j]:=Current[j];//这句出错。
   end;
   Image1.Canvas.Draw(0,0,Bitmap3 );
   Application.ProcessMessages;
  end;
 end;出错语句:project project1.exe raised exception class EAccessViolation with message'Access violation at address 004526FE in module'Project1.exe'.
Write of address 000000000'.

解决方案 »

  1.   

    Bitmap1是不是没有加载图形文件?
      

  2.   

    访问数组中没有的无素; 
    如:var 
      i: Array[0..2] of Integer;
    begin
      i[3] := 0;
    end;你的错误就上述错误
      

  3.   

    ToDisplay[j]:=Current[j];//这句出错。
    如果Current[j]中
    假设 j 现在的值为100
    而你Current数组中的最大值为90
    那你这句话一定是会出错的了,不是吗?
    访问 了一个不存在的内存地址
      

  4.   

    Bitmap1中有图像的,我在前面写了判断的代码的。to Drate(小虫)
     如果是这种情况的话,好像没法判断的这是一些变量:Current,Next,ToDisplay:PByteArray;
                  i,y,j,z:integer;
    代码主要是实现图像间的平滑过渡。