StillFormatType Enumeration

Summary
Defines the format used to save still images using the CaptureCtrl.SaveStillBitmap, ConvertCtrl.SaveStillBitmap and PlayCtrl.SaveStillBitmap methods.
Syntax
C#
C++/CLI
public enum StillFormatType 
public enum class StillFormatType   
Members
ValueMemberDescription
0x00000000BMP Format is the normal Windows BMP format.
0x00000001CMP Format is LEAD's proprietary CMP format.
0x00000002JPEG444 Format is JPEG YUV 4:4:4 format.
0x00000003JPEG422 Format is JPEG YUV 4:2:2 format.
0x00000004JPEG411 Format is JPEG YUV 4:1:1 format.
0x00000005PSPTHM Format is PSP THM format.
Example
C#
using Leadtools; 
using Leadtools.MediaFoundation; 
using LeadtoolsMediaFoundationExamples.Fixtures; 
 
 
public CaptureCtrlForm _form = new CaptureCtrlForm(); 
public CaptureCtrl _capturectrl = null; 
 
public bool _result = false; 
 
public void SaveStillBitmapExample() 
{ 
   // reference the capture control 
   _capturectrl = _form.CaptureCtrl; 
 
   // output file 
   string jpgFile = Path.Combine(LEAD_VARS.MediaDir, "CaptureCtrl_SaveStillBitmap.jpg"); 
 
   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 jpeg file 
      _capturectrl.SaveStillBitmap(jpgFile, StillFormatType.JPEG444, (int)StillQuality.MC, 0, -1); 
 
      // stop the capture 
      _capturectrl.StopCapture(); 
 
      // check for the capture file and set the result 
      if (File.Exists(jpgFile)) 
         _result = true; 
   } 
   catch (Exception) 
   { 
      _result = false; 
   } 
} 
 
static class LEAD_VARS 
{ 
   public const string MediaDir = @"C:\LEADTOOLS22\Media"; 
} 
Requirements

Target Platforms

Help Version 22.0.2022.12.7
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.MediaFoundation Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.