title: Fastest way to draw 40 bitmap on Form canvas Delphi
body: <p>I have an array of record with 3 member ( bitmap path , x , y ) .</p>
  
  <p>I have to after load values in record draw bitmap on Form canvas by x , y .</p>
  
  <p>I tried with this code :</p>
  
  <pre><code>const
    MAXX = 40 ;
  type
    ImgObj = record
      Addrs : string;
      X: Integer ;
      Y: Integer ;
    end;
  var
    All : array[1..MAXX] of ImgObj ;
  
  procedure TForm1.btn1Click(Sender: TObject);
  var
    BuffBitmap :TBitmap ;
    I,j,k: Integer;
  begin
    // set  all bit maps
    ....
    // draw 40 images
    BuffBitmap := TBitmap.Create ;
    for I := 1 to MAXX do
    begin
      BuffBitmap.LoadFromFile(All[i].Addrs);
      for j := 0 to BuffBitmap.Width-1 do
        for k := 0 to BuffBitmap.Height-1 do
        begin
          Self.Canvas.Pixels[All[i].X+j,All[i].Y+k] := BuffBitmap.Canvas.Pixels[j,k] ;
        end;
    end;
  
    BuffBitmap.free;
  end;
  </code></pre>
  
  <p>This code draw them well , but in long time about 8 sec .
  and I must repeat this event more in my app.</p>
  
  <p>Now how I can go to fastest way for draw 40 images on canvas.</p>
  
  <ul>
  <li>Should I store bitmpas on memory for repeat ? </li>
  <li>Should I user pointer for draw images ?</li>
  <li>Or should I use threads for fastest draw ?</li>
  </ul>
  
  <p>Please tell me with samples thanks.</p>