virtual L_INT LBitmapBase::Create(uWidth=100, uHeight=100, uBitsPerPixel=24, uOrder= ORDER_BGR, pPalette=NULL, uViewPerspective=TOP_LEFT, uMemory=TYPE_CONV, pData=NULL, dwSize=0)
Creates a new bitmap in the bitmap object.
The desired initial bitmap width.
The desired initial bitmap height.
The number of bits per pixel. Valid values are 0, 1, 2, 3, 4, 5, 6, 7, 8, 12, 16, 24, 32, 48, and 64.
Use 0 to create an 8-bit grayscale bitmap. In that case, the function ignores the uOrder and pPalette parameters.
The color order for 16-, 24-, and 32-bit bitmaps. If the resultant bitmap is less than 16 bits per pixel, this will have no effect since palletized images have no order. Possible values are:
|ORDER_RGB|| Red, green, and blue color order in memory|
|ORDER_BGR|| Blue, green, and red color order in memory|
|ORDER_GRAY|| 12 or 16-bit grayscale image. 12 and 16-bit grayscale images are only supported in the Document/Medical toolkits.|
|ORDER_RGBORGRAY|| Load the image as red, green, blue OR as a 12 or 16-bit grayscale image. 12 and 16-bit grayscale images are supported in the Document/Medical toolkits only.|
|ORDER_BGRORGRAY|| Load the image as blue, green, red OR as a 12 or 16-bit grayscale image. 12 and 16-bit grayscale images are supported in the Document/Medical toolkits only.|
Pointer to an array of RGBQUAD structures that contains palette info. Pass NULL to use LEAD's fixed palette.
The desired view perspective for the bitmap. For valid values, refer to Accounting for View Perspective.
The type of memory to use when creating the bitmap. Possible values are:
|TYPE_CONV||[0x0001] Use conventional memory if the image will fit, otherwise swap to disk.|
|TYPE_COMPRESSED||[0x0200] (Document/Medical only) Allocate an RLE-compressed bitmap. You can use this flag with TYPE_CONV. For more information, refer to Speeding Up 1-Bit Documents.|
|TYPE_SUPERCOMPRESSED||[0x0400] (Document/Medical only) Keep images compressed in memory. This option causes slow access, but very low memory usage. This option is available only for 1-bit, 8-bit grayscale and 24-bit images.|
Data pointer that will contain the bitmap data when uMemory is TYPE_USER. If pData is NULL, the data pointer must be passed later, by calling LBitmapBase::SetDataPointer, before the bitmap can be used.
Size of the data buffer pointed to by pData. This should be at least pBitmap->Size. This parameter is only valid when uMemory is set to TYPE_USER.
|SUCCESS||The function was successful.|
|< 1||An error occurred. Refer to Return Codes.|
Call this function to create a new bitmap in the bitmap object with the desired dimensions and view perspective.
Some image processing functions, such as LBitmapBase::Rotate and LBitmapBase::ColorRes, need to re-allocate the image data. If you create a bitmap with TYPE_USER, and pass it to these functions, they will change the bitmap to TYPE_CONV and re-allocate memory. Your original data will no longer be used.
Support for 12 and 16-bit grayscale images is only available in the Document/Medical toolkits.
You can specify 0 bits per pixel to create an 8-bit grayscale bitmap. In that case, the function ignores the uOrder and pPalette parameters.
nRet = MyBitmap.Create(100, 200, 24, ORDER_BGR, NULL, TOP_LEFT, TYPE_CONV);
Medical Web Viewer .NET