MatrixObject::GetDIB

Description

Get the handle to the Device Independent Bitmap that represents the current data. The handle returned is not a copy. It is the same handle used by the MatrixObject.

Syntax

HDIB GetDIB( LPCSTR lpcszName = NULL, BOOL bCvtDataIfNoImage = TRUE, DWORD dwOptions = 0 )

Parameters

lpcszName
[input] Name of the DIB. Can be NULL(by default) to use internal default name.
bCvtDataIfNoImage
[input] false is no image
dwOptions
[input] GETDIB_FROM_RGB_DATA: make the DIB from RGB data; GETDIB_SWAP_RGB_ORDER: reverse the BGR to RGB channels

Return

Return a handle to the Device Independent Bitmap on successful exit and NULL on failure.

Examples

EX1

#include <image_utils.h>
// Assume a matrix is the active window
void MatrixObject_GetDIB_Ex1()
{
    MatrixLayer    ml = Project.ActiveLayer();
    if(ml)
    {
        MatrixObject mo = ml.MatrixObjects(0);
        HDIB h = mo.GetDIB(); 
    }
    else
        printf("Matrix window not active.\n");
}

Remark

See Also

MatrixObject::SetDIB

header to Include

origin.h