CreateEmptyDIBByMMAndPixel

#include "BIDIB.H"

 

HANDLE CALLBACK CreateEmptyDIBByMMAndPixel(SIZE lImageSizeInMM, SIZE lImageSize, 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. The horizontal and vertical values of the image must be between 50 and 9999 (DPI = pixel / inch).

Parameters

SIZE

lImageSizeInMM

Size of the DIB in millimeter. These values must be greater than 0.

SIZE

lImageSize

Size of the image in pixel. These values must be greater than 0.

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.