Copyright © 2005-2019 MultiMedia Soft

VideoPlayer.ScreenshotSaveToFile method

Previous pageReturn to chapter overviewNext page

Remarks

 

Saves into a graphic file a screenshot of the image currently displayed on the given video window.

 

For further details about frames grabbing see the How to grab frames from video files tutorial.

For further details about the use of the embedded video player see the VideoPlayer class section.

For details about video clips rendering refer to the How to play video files through DirectShow tutorial.

 

 

Syntax

 

[Visual Basic]

Public Function ScreenshotSaveToFile (

nPlayerIndex as Int16,

nUniqueID as Int32,

strPathname as String,

nFormat as enumGraphicFormats,

nFormatParameter as Int32

) as enumErrorCodes


 

[C#]

public enumErrorCodes ScreenshotSaveToFile (

Int16 nPlayerIndex,

Int32 nUniqueID,

string strPathname,

enumGraphicFormats nFormat,

Int32 nFormatParameter

);


 

[C++]

public: enumErrorCodes ScreenshotSaveToFile (

Int16 nPlayerIndex,

Int32 nUniqueID,

string strPathname,

enumGraphicFormats nFormat,

Int32 nFormatParameter

);


 

Parameter

Description

 

 

nPlayerIndex

Number representing the zero-based index of the player that will use the video player.

nUniqueID

Unique identifier of the video rendering window used in a previous call to the VideoPlayer.VideoWindowAdd method.

strPathname

String containing the absolute pathname where the screenshot will be stored.

nFormat

Graphic format used to save the bitmap.

Supported values are the following:

Mnemonic value

Value

Meaning

GRAPHIC_FORMAT_BMP

0

BMP format

GRAPHIC_FORMAT_JPEG

1

JPEG format

GRAPHIC_FORMAT_PNG

2

PNG format

GRAPHIC_FORMAT_GIF

3

GIF format

GRAPHIC_FORMAT_TIFF

4

TIFF format

nFormatParameter

Eventual parameters required by the chosen graphic format.

 

When the nFormat parameter is set to GRAPHIC_FORMAT_JPEG, this parameter defines the JPEG compression factor whose range can be in the range from 0 (Maximum compression, Lower Quality) to 100 (Minimum compression, Higher Quality).

 

 

Return value

 

Value

Meaning

 

 

Negative value

An error occurred (see the LastError property for further error details)

enumErrorCodes.NOERROR (0)

The method call was successful.