IC Imaging Control .NET

ICImagingControl.MemorySnapImage Method [Deprecated]

ICImagingControl.MemorySnapImage Method [Deprecated]

This method captures a still image from a live video stream.
Public void MemorySnapImage(); Public void MemorySnapImage( int timeoutInMs );
Parameter Description

Specifies the snap timeout value in milliseconds.


This method captures a still image from a live video stream and stores it in the ring buffer. The buffer can be saved to a file using the ICImagingControl.MemorySaveImage Method.

If the live video stream is already running, then the maximum duration of MemorySnapImage is double of the frame rates time interval. MemorySnapImage captures the next new provided image from the live video stream.

If the live video stream was not started before a call of MemorySnapImage, then the live video stream is started in MemorySnapImage automatically. An image will be captured and the live video stream is stopped automatically. If MemorySnapImage is called often in an application, then this sequence of start - snap - stop can be very time expensive. Thus, it is better to call LiveStart once in the application and stop the live video stream when the application ends.

When LiveCaptureContinuous is true, MemorySnapImage throws an ICException with the error code ICException.ErrorCodes.NotAvailableOutsideSnapMode.

If no image was provided by the video capture device in the timeout time an exception is thrown.

If an external triggered camera is in use, then MemorySnapImage should be avoided, because it blocks the application until it returns. For triggered cameras the ImageAvailable event should be used.


This method is deprecated since version 3.5.
Use the methods on the actual sink


The following code snippet shows how to snap an image from the video live stream using a timeout of 1000ms. The snapped image will be shown in a PictureBox:

ICImagingControl1.LiveStart(); try { // Use a timeout of 1000ms. ICImagingControl1.MemorySnapImage(1000); // Show the snapped image in a PictureBox. pictureBox1.Image = ICImagingControl1.ImageActiveBuffer.Bitmap; } catch( ICException Ex ) { MessageBox.Show(Ex.Message, "MemorySnapImage Error"); } ICImagingControl1.LiveStop();
See also: ICImagingControl, ICImagingControl.MemorySaveImage, ICImagingControl.ImageActiveBuffer, ICException.ErrorCodes

<< ICImagingControl

Get in touch with us

About The Imaging Source

Established in 1988, The Imaging Source is one of the leading manufacturers of industrial cameras, video converters and embedded vision components for factory automation, quality assurance, medicine, science, security and a variety of other markets.

Our comprehensive range of cameras with USB 3.1, USB 3.0, USB 2.0, GigE, MIPI interfaces and other innovative machine vision products are renowned for their high quality and ability to meet the performance requirements of demanding applications.

ISO 9001:2015 certified MVTEC | Edge AI + Vision Alliance | EMVA

Contact us