CreateUserBitmap2 method (ILEADRaster)

Visual Basic example

Visual C++ 5.0 example

 

Syntax

short CreateUserBitmap2 (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 SetBitmapDataPointer2. Freeing this type of bitmap will not free the data pointer set by the SetBitmapDataPointer2 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, CreateUserBitmap method, SetBitmapDataPointer2 method

Topics:

Raster Images: Creating and Deleting Images