ZD Screen Recorder SDK API – ScnLib_SetWebcamViewMode()

ScnLib_SetWebcamViewMode()

Std EditionPro EditionMax EditionUltra Edition
C++ __declspec(dllimport) void __stdcall ScnLib_SetWebcamViewMode(int nViewMode);
C# [DllImport("ScnLib.dll")] public static extern void ScnLib_SetWebcamViewMode(int ViewMode);
Basic Public Declare Sub ScnLib_SetWebcamViewMode Lib "ScnLib.dll" (ByVal ViewMode As Int32)
Delphi procedure ScnLib_SetWebcamViewMode(ViewMode: Integer); stdcall; external 'ScnLib.dll';
  • Description
    Set the mode to align the original webcam resolution aspect ratio with the webcam view aspect ratio.

  • Parameters
    • ViewMode [in]
      • SCNLIB_WEBCAM_VIEW_PADDING
        Displays the entire webcam view, but may add black bars on the top and bottom or the left and right sides if the aspect ratios differ.
      • SCNLIB_WEBCAM_VIEW_CROPPING
        Shows the largest possible area of the webcam view within the view size.
      • SCNLIB_WEBCAM_VIEW_STRETCHING
        Fits the entire webcam image into the view size, but may stretch the image.
  • Return Value
    None.

  • Remarks
    Use this function to set the mode to align the original webcam resolution aspect ratio with the webcam view aspect ratio. Webcam devices often come with varying resolution aspect ratios, like 4:3, 16:9, etc. The webcam view size might be set to a different aspect ratio, and in such scenarios, the SDK offers several modes to align the original webcam resolution aspect ratio with the webcam view aspect ratio. These include padding, cropping, and stretching.
    • Padding mode displays the entire webcam view, but may add black bars on the top and bottom or the left and right sides if the aspect ratios differ.
    • Cropping mode shows the largest possible area of the webcam view within the view size.
    • Stretching mode fits the entire webcam image into the view size, but may stretch the image.
    The default webcam view mode is cropping (SCNLIB_WEBCAM_VIEW_CROPPING). To check the current webcam view mode, call ScnLib_GetWebcamViewMode().

  • See Also
    ScnLib_PreviewWebcam()
    ScnLib_GetWebcamViewMode()
    ScnLib_SetWebcamViewSize()

Shopping Cart
  • Your cart is empty.
Scroll to Top