Exemplo n.º 1
0
        public void Capture(int imageCaptureRepetitions, int imageCaptureTime, ImageFormat imageFormat)
        {
            System.Threading.Thread.Sleep(1000);
            this.imageFormat = imageFormat;
            Image imageResolution = ScreenCapture.CaptureDesktop();

            this.imageResolution  = new ScreenResolution(imageResolution.Height, imageResolution.Width);
            this.imageCaptureTime = imageCaptureTime;
            this.imagesCaptured   = imageCaptureRepetitions;

            for (int i = 0; i < imageCaptureRepetitions; i++)
            {
                using (Image image = ScreenCapture.CaptureDesktop())
                {
                    fileFrames.Add(new SSFrame(i, ImageTools.ImageToBase64(image, imageFormat)));
                }
                System.Threading.Thread.Sleep(imageCaptureTime);
            }
        }