CreateUserBitmap method (Main Control)

Visual Basic example
Visual C++ 4.0 example

Syntax short CreateUserBitmap (float fWidth, float fHeight, short iBitsPerPixel, VARIANT vData, long lDataSize);

Overview:  Refer to Copying and Creating Bitmaps.

Remarks

This method creates a user bitmap. The user is responsible for allocating and managing the bitmap data pointer. The bitmap data pointer can be specified when the bitmap is created or it can be set later using SetBitmapDataPointer. Freeing this type of bitmap will not free the data pointer set by the SetBitmapDataPointer method.

If the bitmap is 8 bits/pixel or less, the bitmap’s palette should be set with the BitmapPalette property.

The data is not copied. The user is responsible for making sure the bitmap data is valid. This method is designed for high-speed bitmap manipulation.

Note that in LEADTOOLS, the bitmap data is allocated so every row contains a multiple of 4 bytes. The data that you pass to this method should follow the same convention.

See Also

Elements: CreateBitmap method, SetBitmapDataPointer method

Topics:  Raster Images: Creating and Deleting Images