FrameExtensions.SaveAsJpeg Method

Saves the contents of the IFrame to a JPEG compressed file to disk.
Syntax:
[C#]
public void SaveAsJpeg(this IFrame frame, string Filename, int Quality);
Parameter Description
frame

The image to save.

Filename

The name of the file to which the buffer is saved.

Quality

Desired image quality. Should be in the range between 0 and 100.

Information:

Introduced in version 3.5

Example::

Small example showing how to fetch a simple image and save it in a file.

[C#]
FrameSnapSink sink = new FrameSnapSink(MediaSubtypes.RGB32); ICImagingControl1.Sink = sink; ICImagingControl1.LiveStart(); // fetch a single image IFrameQueueBuffer frame = sink.SnapSingle(TimeSpan.FromSeconds(5)); FrameExtensions.SaveAsBitmap( frame, "test.bmp"); FrameExtensions.SaveAsJpeg( frame, "test.jpg", 90); FrameExtensions.SaveAsTiff( frame, "test.tiff");
See also: FrameExtensions, FrameExtensions.SaveAsBitmap, FrameExtensions.SaveAsTiff, IFrame

<< FrameExtensions