CreateBitmap method (Main Control)

Visual Basic example
Visual C++ 4.0 example

Visual J++ example

Syntax short CreateBitmap (float fWidth, float fHeight, short iBitsPerPixel);

Overview:  Refer to Copying and Creating Bitmaps.

Remarks

Initializes and allocates the bitmap, without loading any data.

If you specify 8 bits per pixel or less, the bitmap is created with LEAD's fixed palette. If you specify 0 bits per pixel, for grayscale, the bitmap is created as an 8-bit image with a grayscale palette. If you need to change the palette, refer to the ColorRes method.

Some image processing functionality, such as Rotate and ColorRes methods need to re-allocate the image data. If you create a bitmap and pass it to these methods, they will change the bitmap to TYPE_CONV and re-allocate memory. So if you set your data using SetBitmapDataPointer it will no longer be used.

See Also

Topics:  Raster Images: Creating and Deleting Images
Raster Images: Palettes