This function creates a DDB of the image.
Declaration:
Copy Code | |
---|---|
AT_ERRCOUNT ACCUAPI IG_dspl_DDB_create( [IN] HIGEAR hIGear, [IN] DWORD dwGrpID, [IN] HDC hDC, [IN] AT_DIMENSION nWidth, [IN] AT_DIMENSION nHeight, [IN] BOOL bExport, [OUT] HBITMAP FAR* lphBitmap, [OUT] HPALETTE FAR* lphPalette ); |
Arguments:
hIGear | ImageGear handle of image. |
dwGrpID | Identifier of group in which the options are stored. |
hDC | Handle of device context with which the DDB should be compatible. If NULL, then the DDB will be compatible with the desktop's device context. |
nWidth | Width of DDB that is to be created. |
nHeight | Height of DDB that is to be created. |
bExport | Boolean parameter which specifies whether to delete the source image or not. If TRUE then the hIGear image will be deleted after the DDB is created, but if FALSE then the image is left unchanged. |
lphBitmap | Pointer to where to return the DDB object. |
lphPalette | Pointer to where to return the palette handle for this DDB. |
Return Value:
Returns the number of ImageGear errors that occurred during this function call.
Supported Raster Image Formats:
All pixel formats supported by ImageGear Professional.
Sample:
Display, Image Util
Example:
Copy Code | |
---|---|
HIGEAR hIGear; /* HIGEAR handle of image */ DWORD nGrpID; /* display group identifier */ HBITMAP hBitmap; /* handle of bitmap */ HPALETTE hPalette; /* handle of palette */ ... case ID_IMAGE_EXPORT: ... IG_dspl_DDB_create( hIGear, nGrpID, NULL, 640, 480, TRUE, &hBitmap, &hPalette ); ... break; ... |
Remarks:
This function always uses all the display options specified by dwGrpIDgroup and assumes that the output device has a color format compatible with the hDC, but the client area of the output device is a rectangle of nWidth x nHeight size. For 1 bit per pixel images, bit depth of the resulting DDB depends on anti-aliasing settings. If anti-aliasing is turned off, the resulting DDB has 1 bit per pixel, otherwise its bit depth is equal to the hDC bit depth.