这个快速是什么意思?怎样算快?
我想,如果是屏幕上显示的图像,只能是获取其Canvas之后,通过pixel或者scanline来访问啦。
不过我估计这样的方法是不快。
当然,如果是特定的图片文件格式,那么就很有可研究的了,可惜我不会 :)

解决方案 »

  1.   

    要是能整块的bitblt几下就快了!
      

  2.   

    不知下面的代码是否有用!unit Unit1;interfaceuses
      Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
      StdCtrls, ExtCtrls;type
      TForm1 = class(TForm)
        btnStartDraw: TButton;
        btnQuit: TButton;
        Image1: TImage;
        procedure FormCreate(Sender: TObject);
        procedure FormPaint(Sender: TObject);
        procedure btnStartDrawClick(Sender: TObject);
      private
        { Private declarations }
        Earthmap : HBitmap;
      public
        { Public declarations }
        procedure DrawBitmap(PaintDC : HDC; Bitmap : HBitmap;
                                X, Y : integer);
      end;var
      Form1: TForm1;
      AWidth, AHeight : integer;
      
    implementation{$R *.DFM}
    {$R earth.res}{ TForm1 }procedure TForm1.DrawBitmap(PaintDC: HDC; Bitmap: HBitmap; X, Y: integer);
    var
        MemDC : HDC;
        OldBitmap : HBitmap;
    begin
        MemDC := CreateCompatibleDC(PaintDC);
        OldBitmap := SelectObject(MemDC, Bitmap);
        if (EarthMap <> 0)
        then BitBlt(PaintDC, X, Y, AWidth, AHeight, MemDC, 0, 0, SRCCOPY);
        SelectObject(MemDC, OldBitmap);
        DeleteObject(MemDC);
    end;procedure TForm1.FormCreate(Sender: TObject);
    var
        BitmapStruct : Windows.TBitmap;    //"Windows." can't be removed;
    begin
        Earthmap := LoadBitmap(hInstance, 'EARTH');
        GetObject(Earthmap,sizeof(Windows.TBitmap), @BitmapStruct);
        AWidth := BitmapStruct.bmWidth;
        AHeight := BitmapStruct.bmHeight;
        PostMessage(Handle, WM_SIZE, 0, 0);
    end;procedure TForm1.FormPaint(Sender: TObject);
    var
        times : integer;
    begin
        for times := 0 to 5 do
            DrawBitmap(GetDC(Handle), Earthmap, 20* times , 20 * times);
    end;procedure TForm1.btnStartDrawClick(Sender: TObject);
    begin
        DrawBitmap(GetDC(Handle), Earthmap, 20  , 0);
    end;end.