Var mapDest = bitmap.LockBits(boundsRect, ImageLockMode.WriteOnly, bitmap.PixelFormat) Copy pixels from screen capture Texture to GDI bitmap Var boundsRect = new (0, 0, width, height)
Var bitmap = new (width, height, PixelFormat.Format32bppArgb) Var mapSource = (screenTexture, 0, MapMode.Read, MapFlags.None) Using (var screenTexture2D = screenResource.QueryInterface())ĭ(screenTexture2D, screenTexture) copy resource into memory that can be accessed by the CPU
Try to get duplicated frame within given timeĭuplicatedOutput.AcquireNextFrame(10000, out duplicateFrameInformation, out screenResource) OutputDuplicateFrameInformation duplicateFrameInformation