public enum StillFormatType
public enum class StillFormatType
Value | Member | Description |
---|---|---|
0x00000000 | BMP | Format is the normal Windows BMP format. |
0x00000001 | CMP | Format is LEAD's proprietary CMP format. |
0x00000002 | JPEG444 | Format is JPEG YUV 4:4:4 format. |
0x00000003 | JPEG422 | Format is JPEG YUV 4:2:2 format. |
0x00000004 | JPEG411 | Format is JPEG YUV 4:1:1 format. |
0x00000005 | PSPTHM | Format is PSP THM format. |
using Leadtools;
using Leadtools.MediaFoundation;
using LeadtoolsMediaFoundationExamples.Fixtures;
public CaptureCtrlForm _form = new CaptureCtrlForm(false);
public CaptureCtrl _capturectrl = null;
public bool _result = false;
public void SaveStillBitmapExample()
{
// reference the capture control
_capturectrl = _form.CaptureCtrl;
// output file
string cmpFile = Path.Combine(LEAD_VARS.MediaDir, "CaptureCtrl_SaveStillBitmap.cmp");
try
{
// select a video capture device
if (_capturectrl.VideoDevices["USB"] == null)
throw new Exception("No USB video device available");
_capturectrl.VideoDevices["USB"].Selected = true;
// start the capture
_capturectrl.StartCapture(CaptureMode.Still);
// save the still image to a cmp file
_capturectrl.SaveStillBitmap(cmpFile, StillFormatType.CMP, (int)StillQuality.MC, 0, -1);
// stop the capture
_capturectrl.StopCapture();
// check for the capture file and set the result
if (File.Exists(cmpFile))
_result = true;
}
catch (Exception ex)
{
_result = false;
}
}
static class LEAD_VARS
{
public const string MediaDir = @"C:\LEADTOOLS23\Media";
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document