我正在捕获图像以进行视频录制。并且当分辨率小于或等于1920 X 1080时,效果很好。
当我捕获分辨率为3840 X 2160的图像时,大约需要200毫秒。
using (Bitmap bmp = new Bitmap(CaptureRegion.Width, CaptureRegion.Height))
{
using (Graphics g = Graphics.FromImage(bmp))
{
g.CopyFromScreen(CaptureRegion.Left, CaptureRegion.Top, 0, 0, bmp.Size);
}
Bitmap resized = new Bitmap(bmp, new Size(1920, 1080));
playerFrame(resized);
}