to iceapi:
我对这截屏时间研究了一下?看看下面截屏代码:
procedure GetScreen(var ScreenBmp: TBitmap);
var //主函数开始
DC: HDC;
time : integer;
begin
time := gettickcount;
ScreenBmp.Width := screen.Width;
ScreenBmp.Height := screen.Height;
ScreenBmp.PixelFormat := pf24bit ; //这一句关键
//type TPixelFormat = (pfDevice, pf1bit, pf4bit, pf8bit, pf15bit, pf16bit, pf24bit, pf32bit, pfCustom);
dc := GetWindowDC(0);
try
BitBlt(ScreenBmp.Canvas.Handle, 0,0,screen.Width,screen.Height,dc, 0,0,SRCCOPY);
finally
ReleaseDC(0, DC);
end;
label3.Caption := inttostr(integer(gettickcount)-time);
end; //主函数结束
上面指出来关键那一句//如果注释掉或者取值为pfDevice的时候
我在1024*768*32下的截屏时间都是0
也就是说如果你不改变位图的颜色质量的话,截屏截屏是基本不要时间的//