예제 #1
0
        /// <summary>
        /// Encodes the captures into a single packet and prepares for it's transmission
        /// </summary>
        /// <param name="id">Client Id</param>
        /// <param name="screenImg">Screenshot</param>
        /// <param name="logStream">Key & Mouse event log stream</param>
        /// <param name="isSingleCapture">Live stream or buffered stream</param>
        public void EncodeCapture(int id, Bitmap screenImg, Stream logStream, bool isSingleCapture)
        {
            Quantizer oq = this.GetQuantizer();//new OctreeQuantizer(this.CaptureQuantizePalette, this.CaptureQuantizeDepth);

            screenImg = oq.Quantize(ScreenSnap.ShrinkBitmap(screenImg, this.CaptureShrinkFactor));
            this.EncodeCapture(id, new CapturePacket(ScreenSnap.SnapshotToStream(screenImg, System.Drawing.Imaging.ImageFormat.Png), logStream), isSingleCapture);
        }
예제 #2
0
        private void Capture()
        {
            Bitmap bmp = ScreenSnap.ScreenSnapshot();

            if (this.CaptureMouse)
            {
                bmp = ScreenSnap.PlaceCursor(bmp);
            }
            //this.screenLog.Enqueue(bmp);
            this.screenLog = bmp;
        }
예제 #3
0
        private void Capture()
        {
            Bitmap bmp = ScreenSnap.ScreenSnapshot();

            if (this.CaptureMouse)
            {
                bmp = ScreenSnap.PlaceCursor(bmp);
                IntPtr hCursor = ScreenSnap.CheckCursorChanged();
                if (hCursor != IntPtr.Zero)
                {
                    this.CursorChanged(hCursor);
                }
            }
            //this.screenLog.Enqueue(bmp);
            this.screenLog = bmp;
        }