Take snapshot from code

I got time when some object is in video, I need to take snapshot throw c# code at that time

f.e.g. take snapshot at time of 2018.07.05. 10:00:00

I need some example if someone got it it will be nice.

If using an ImageViewerControl use

--

virtual Bitmap VideoOS.Platform.Client.ImageViewerControl.GetCurrentDisplayedImageAsBitmap (

) [inline, virtual]

-

Get the latest displayed Image including the overlays and privacy mask.

Note that if no image has been received from the server, a null is returned.

Important: If the returned Bitmap is used in a UserControl, like a PictureBox, the control will hold to the original Bitmap. This can cause issues when the original source of the Bitmap attempts to dispose it.

Recommendation is to create another Bitmap directly upon calling this method, when passing it on to a PictureBox.

Bitmap bitmap = imageViewControl.GetCurrentDisplayedImageAsBitmap();

if (bitmap!=null)

{

myPictureBox.Image = newBitmap(bitmap, myPictureBox.Size()); // If you like to resize to picturebox size

bitmap.Dispose();

} else

{

// Clear the picturebox …

}

.

Returns:

A bitmap or null or no image is available.

--

If not using an ImageViewerControl I would recommend to use JpegVideoSource (or BitmapVideoSource), you might be able to use code from the CameraStreamResolution sample.

Thanks Anderson.

Best regards.