LEADTOOLS Multimedia (Leadtools.Multimedia assembly)
LEAD Technologies, Inc

StillFormatType Enumeration

ExampleExample 





The StillFormatType enumeration values define the format used to save still images using the CaptureCtrl.SaveStillBitmap, ConvertCtrl.SaveStillBitmap and PlayCtrl.SaveStillBitmap methods
Syntax
'Declaration
 
Public Enum StillFormatType 
   Inherits System.Enum
   Implements System.IComparableSystem.IConvertibleSystem.IFormattable 
'Usage
 
Dim instance As StillFormatType
public enum StillFormatType : System.IComparableSystem.IConvertibleSystem.IFormattable  
Leadtools.Multimedia.StillFormatType = function() { };
Leadtools.Multimedia.StillFormatType.prototype = {
LeadtoolsMemberMarker(replace me) };
public enum class StillFormatType : public System.Enum, System.IComparableSystem.IConvertibleSystem.IFormattable  
Members
MemberDescription
BMPFormat is the normal Win BMP format.
CMPFormat is LEAD’s proprietary CMP format.
JPEG411Format is JPEG YUV 4:1:1 format.
JPEG422Format is JPEG YUV 4:2:2 format.
JPEG444Format is JPEG YUV 4:4:4 format.
PSPTHMFormat is PSP THM format.
Example
Copy CodeCopy Code  
Public _form As CaptureCtrlForm = New CaptureCtrlForm()
      Public _capturectrl As CaptureCtrl = Nothing
      Public _result As Boolean = False

      Public Sub SaveStillBitmapExample()
         ' reference the capture control
         _capturectrl = _form.CaptureCtrl

         ' output file
         Dim jpgFile As String = Path.Combine(LEAD_VARS.MediaDir, "CaptureCtrl_SaveStillBitmap.jpg")

         Try
            ' select a video capture device
            If _capturectrl.VideoDevices("USB") Is Nothing Then
               Throw New Exception("No USB video device available")
            End If

            _capturectrl.VideoDevices("USB").Selected = True

            ' set a video compressor for the capture file
            _capturectrl.VideoCompressors.Mpeg4.Selected = True

            ' start the capture
            _capturectrl.StartCapture(CaptureMode.Still)

            ' save the still image to a jpeg file
            _capturectrl.SaveStillBitmap(jpgFile, StillFormatType.JPEG444, 9, 0, -1)

            ' stop the capture
            _capturectrl.StopCapture()

            ' check for the capture file and set the result
            If File.Exists(jpgFile) Then
               _result = True
            End If
         Catch e1 As Exception
            _result = False
         End Try
      End Sub

Public NotInheritable Class LEAD_VARS
   Public Const MediaDir As String = "C:\Program Files (x86)\LEAD Technologies\LEADTOOLS 175\Media";
End Class
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;

            // set a video compressor for the capture file
            _capturectrl.VideoCompressors.Mpeg4.Selected = true;

            // start the capture
            _capturectrl.StartCapture(CaptureMode.Still);

            // save the still image to a jpeg file
            _capturectrl.SaveStillBitmap(jpgFile, StillFormatType.JPEG444, 9, 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:\Program Files (x86)\LEAD Technologies\LEADTOOLS 175\Media";
}
Inheritance Hierarchy

System.Object
   System.ValueType
      System.Enum
         Leadtools.Multimedia.StillFormatType

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

Leadtools.Multimedia Namespace

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2012 All Rights Reserved. LEAD Technologies, Inc.

Leadtools.Multimedia requires a Multimedia or Multimedia Suite license and unlock key. For more information, refer to: LEADTOOLS Toolkit Features