Copyright © 2005-2018 MultiMedia Soft

VideoPlayer.FrameGrabberResultsGetPixelColor method

Previous pageReturn to chapter overviewNext page

Remarks

 

After completing a grabbing session, through a call to one between the VideoPlayer.FrameGrabberExecToFile and VideoPlayer.FrameGrabberExecToMemory methods, given the index of a grabbed frame obtains the color of a pixel at specific coordinates.

 

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 FrameGrabberResultsGetPixelColor (

nPlayerIndex as Int16,

nFrameIndex as Int32,

X as Int32,

Y as Int32

) as Color


 

[C#]

public Color FrameGrabberResultsGetPixelColor (

Int16 nPlayerIndex,

Int32 nFrameIndex,

Int32 X,

Int32 Y

);


 

[C++]

public: Color FrameGrabberResultsGetPixelColor (

Int16 nPlayerIndex,

Int32 nFrameIndex,

Int32 X,

Int32 Y

);


 

Parameter

Description

 

 

nPlayerIndex

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

nFrameIndex

Number representing the zero-based index of the grabbed frame. You can obtain the total number of grabbed frames in the following way:

if the value returned by the VideoPlayer.FrameGrabberResultsGetAvailableType method is TYPE_OF_GRABBED_FRAME_FILES, call the VideoPlayer.FrameGrabberResultsGetFilesCount method
if the value returned by the VideoPlayer.FrameGrabberResultsGetAvailableType method is TYPE_OF_GRABBED_FRAME_BITMAPS, call the VideoPlayer.FrameGrabberResultsGetBitmapsCount method

X

Horizontal coordinate of the frame expressed in pixels

Y

Vertical coordinate of the frame expressed in pixels

 

 

Return value

 

The color of the requested pixel