#include "BIDIB.H"
HANDLE CALLBACK CreateEmptyDIBByInchAndDPI(SIZEFLOAT lImageSizeInInch, LONG lXRes, LONG lYRes, BYTE byBitCount, BOOL bIsWhite)
Description
This function creates an empty DIB. The DIB created can be 1, 8 or 24 bit per pixel. The DIB can be all white or all black depending on the last parameter. If you create a monochrome DIB the first item in the palette will be the black and the second item will be the white color. If you create an 8 bit per pixel DIB, the palette will contain 256 items in the palette. In this case the the first item in the palette will be (255, 255, 255), and the others will be zero.
Parameters
|
SIZEFLOAT |
lImageSizeInInch |
Size of the DIB in inch. These values must be greater than 0. |
|
LONG |
lXRes |
Horizontal resolution. This value must be between 50 and 9999. |
|
LONG |
lYRes |
Vertical resolution. This value must be between 50 and 9999. |
|
BYTE |
byBitCount |
Specifies the bitcount. This value is 1, 8 or 24. |
|
BOOL |
bIsWhite |
If TRUE, the DIB will be white, otherwise FALSE. |
Return values
Handle to the empty DIB created or NULL on error.
Programming notes
You can creates empty bitmap programatically for further use. For example you can put annotations or barcodes on it.
Requirements
Header : Declared in BiDIB.h; include BiDIB.h.
Library : Use BiDIB.lib.
DLLs : BiDIB.dll.
Code example
None at present.