IC Imaging Control .NET

FrameSnapSink.Constructors Method

FrameSnapSink.Constructors Method

Creates a new FrameSnapSink instance.
public FrameSnapSink(); public FrameSnapSink( Guid mediaSubType ); public FrameSnapSink( FrameType frameType ); public FrameSnapSink( FrameTypes frameTypeList );
Parameter Description

This is a convienience parameter for

new FrameQueueSink( ..., new FrameTypes( new FrameType( mediaSubType ) ) ... );

The FrameType this sink connects with.


The list of FrameTypes this sink accepts as input type.


Introduced in version 3.5


The following example shows how create a FrameSnapSink which only accepts RGB32 images and uses SnapSequence to capture some frames.

FrameSnapSink sink = new FrameSnapSink(MediaSubtypes.RGB32); ICImagingControl1.Sink = sink; ICImagingControl1.LiveStart(); int index = 0; IFrameQueueBuffer[] lst = sink.SnapSequence(5, TimeSpan.FromSeconds(5)); foreach( IFrameQueueBuffer frame in lst ) { // do something with each buffer frame.SaveAsBitmap(String.Format("test_{0}.bmp", index++)); } // reusing buffers in a snap sink IFrameQueueBuffer[] lst2 = sink.SnapSequence(lst, TimeSpan.FromSeconds(5)); // save the next buffer sequence foreach( IFrameQueueBuffer frame in lst2 ) { // do something with each buffer frame.SaveAsBitmap(String.Format("test_{0}.bmp", index++)); }
See also : FrameSnapSink, FrameType, FrameTypes

<< FrameSnapSink

Get in touch with us

About The Imaging Source

Established in 1990, The Imaging Source is one of the leading manufacturers of industrial cameras, frame grabbers and video converters for production automation, quality assurance, logistics, medicine, science and security.

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

Automated Imaging Association ISO 9001:2015 certified

Contact us