public static captureFromScreen ( int left, int top, int width, int height ) : |
||
left | int | Left position in screen for captured bitmap |
top | int | Top position in screen for captured bitmap |
width | int | Width of captured bitmap |
height | int | Height of captured bitmap |
Результат |
/// <summary> /// Get Test Image Data /// </summary> private void GetTestData() { testData = new RdpegfxTestUtility(); // Load clearcodec image String RdpegfxClearCodecImagePath; if (!PtfPropUtility.GetStringPtfProperty(TestSite, "ClearCodecImage", out RdpegfxClearCodecImagePath)) { RdpegfxClearCodecImagePath = ""; } try { testData.ClearCodecImage = (Bitmap)Image.FromFile(RdpegfxClearCodecImagePath); } catch (System.IO.FileNotFoundException) { testData.ClearCodecImage = RdpegfxTestUtility.captureFromScreen(0, 0, RdpegfxTestUtility.surfWidth, RdpegfxTestUtility.surfHeight); } // Load RfxProgressiveCodec image String RdpegfxRfxProgCodecImagePath; if (!PtfPropUtility.GetStringPtfProperty(TestSite, "RfxProgressiveCodecImage", out RdpegfxRfxProgCodecImagePath)) { RdpegfxRfxProgCodecImagePath = ""; } try { testData.RfxProgCodecImage = (Bitmap)Image.FromFile(RdpegfxRfxProgCodecImagePath); } catch (System.IO.FileNotFoundException) { testData.RfxProgCodecImage = RdpegfxTestUtility.captureFromScreen(0, 0, RdpegfxTestUtility.surfWidth, RdpegfxTestUtility.surfHeight); } }