Skip to content

GetLastFrameBitmapBits2

function

Delphi
function GetLastFrameBitmapBits2 (BufferIndex: LongInt; WithOverlays: Boolean; ReleaseFrame: Boolean; out BitmapWidth: LongInt; out BitmapHeight: LongInt; out BitmapLineSize: LongInt; out BitmapSize: LongInt; out BitmapBitsPerPixel: LongInt): NativeInt;
C++Builder
void * __fastcall GetLastFrameBitmapBits2(System::LongInt BufferIndex, bool WithOverlays, bool ReleaseFrame, /* out */ System::LongInt &BitmapWidth, /* out */ System::LongInt &BitmapHeight, /* out */ System::LongInt &BitmapLineSize, /* out */ System::LongInt &BitmapSize, /* out */ System::LongInt &BitmapBitsPerPixel);
C#
public IntPtr GetLastFrameBitmapBits2(int BufferIndex, bool WithOverlays, bool ReleaseFrame, out int BitmapWidth, out int BitmapHeight, out int BitmapLineSize, out int BitmapSize, out int BitmapBitsPerPixel);
VB.NET
Public Function GetLastFrameBitmapBits2(BufferIndex As Integer, WithOverlays As Boolean, ReleaseFrame As Boolean, ByRef BitmapWidth As Integer, ByRef BitmapHeight As Integer, ByRef BitmapLineSize As Integer, ByRef BitmapSize As Integer, ByRef BitmapBitsPerPixel As Integer) As IntPtr
C++/Qt
void * GetLastFrameBitmapBits2 (int BufferIndex, BOOL WithOverlays, BOOL ReleaseFrame, int *BitmapWidth, int *BitmapHeight, int *BitmapLineSize, int *BitmapSize, int *BitmapBitsPerPixel);

Returns a pointer to the bitmap bits of the last video frame, along with the bitmap format information.

Invoke this function to lock and get access to the bitmap bits.

Immediately after processing the bitmap bits, invoke it again with the "ReleaseFrame" parameter set to false to unlock the sample.

E.g.:

...

int BitmapWidth, BitmapHeight, BitmapLineSize, BitmapSize, BitmapBitsPerPixel;

BYTE pBits = GetLastFrameBitmapBits2 (0, true, false, &BitmapWidth, &BitmapHeight, &BitmapLineSize, &BitmapSize, &BitmapBitsPerPixel);

CopyMemory (pDest, pBits, BitMapSize);

GetLastFrameBitmapBits (0, true, true, null, null, null, null, null);

...