ImageGear for C and C++ on Windows v19.10 - Updated
IG_dspl_artx_DDB_create
API Reference Guide > Core Component API Reference > Core Component Functions Reference > Display Functions > IG_dspl_artx_DDB_create

This function creates a DDB of the image and ArtX annotations.

Declaration:

 
Copy Code
AT_ERRCOUNT   ACCUAPI  IG_dspl_artx_DDB_create( 
        [IN] HIGEAR hIGear, 
        [IN] DWORD dwGrpID, 
        [IN] HIG_ARTX_PAGE hArtXPage, 
        [IN] HDC hDC, 
        [IN] AT_DIMENSION nWidth, 
        [IN] AT_DIMENSION nHeight, 
        [IN] BOOL bExport, 
        [OUT] HBITMAP FAR* lphBitmap, 
        [OUT] HPALETTE FAR* lphPalette 
); 

Arguments:

Name Type Description
hIGear HIGEAR ImageGear handle of image.
dwGrpID DWORD Identifier of group in which the options are stored.
hArtXPage HIG_ARTX_PAGE ImageGear handle to the ArtX annotation page.
hDC 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 AT_DIMENSION Width of DDB that is to be created.
nHeight AT_DIMENSION Height of DDB that is to be created.
bExport BOOL 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 HBITMAP FAR* Pointer to where to return the DDB object.
lphPalette HPALETTE FAR* 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 for C and C++.

Example:

 
Copy Code
HIGEAR           hIGear;    /* HIGEAR handle of image  */  
DWORD           nGrpID;     /* display group identifier */ 
HIG_ARTX_PAGE  hArtXPage;    /* Handle of ArtX page  */  
HBITMAP hBitmap;    /* handle of bitmap  */ 
HPALETTE hPalette;   /* handle of palette */ 
 ... 
case ID_IMAGE_EXPORT: 
         ...  
IG_dspl_artx_DDB_create( hIGear, nGrpID, hArtXPage, NULL, 640, 480, TRUE, 
&hBitmap, &hPalette ); 
         ... 
        break; 
 ... 

Remarks:

This function always uses all the display options specified by dwGrpID group 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.