New to Telerik UI for WinFormsStart a free 30-day trial

Snapshots

Updated over 6 months ago

RadWebCam allows you to snapshot the currently displayed video feed. This can be done via the "Take snapshot" button of the control, or the TakeSnapshot method. This will fire the SnapshotTaken event where you can get the Image object.

WinForms RadWebcam Snapshots

Taking a snapshot in code

C#

        public WebCamFeatures()
        {
            InitializeComponent();

            this.radWebCam1.SnapshotTaken += radWebCam1_SnapshotTaken;
        }

        private void radWebCam1_SnapshotTaken(object sender, Telerik.WinControls.UI.SnapshotTakenEventArgs e)
        {
            Image snapshot = e.Snapshot;
            // here you save the image to a file, in memory, or to show it in the UI 
        }

        private void OnTakeSnapshot(object sender, EventArgs e)
        {
            this.radWebCam1.TakeSnapshot();
        }

Preview Snapshots

By default, when you take a snapshot a preview of the image will be shown. To disable this, set the PreviewSnapshots property to false.

C#

        this.radWebCam1.PreviewSnapshots = false;

You can indicate if the snapshot preview is displayed via the IsPreviewingSnapshot property of RadWebCam.

See Also

In this article
Preview SnapshotsSee Also
Not finding the help you need?
Contact Support