The BITMAPHANDLE structure serves as a working area for image manipulation and conversion. LEADTOOLS functions use this structure as a bitmap handle for accessing the image in memory and for maintaining the characteristics of the image.
The LBitmapBase class contains a data member of type BITMAPHANDLE. You can access the LBitmapBase object's internal BITMAPHANDLE using the following member functions:
LBitmapBase::GetHandle
LBitmapBase::GetWidth
LBitmapBase::GetHeight
LBitmapBase::GetMemSize
LBitmapBase::IsAllocated
LBitmapBase::GetColorOrder
LBitmapBase::GetXResolution
LBitmapBase::GetYResolution
LBitmapBase::SetXResolution
LBitmapBase::SetYResolution
LBitmapBase::IsMemoryLocked
LBitmapBase::GetBitsPerPixel
LBitmapBase::GetBytesPerLine
LBitmapBase::Is1BitCompressed
LBitmapBase::IsUsingDiskMemory
LBitmapBase::GetViewPerspective
LBitmapBase::SetViewPerspective
LBitmapBase::IsUsingConventionalMemory
LBitmapBase::IsProgressive
LBitmapBase::IsPlayBackWaitUserInput
LBitmapBase::IsPlayBackTransparencyEnabled
LBitmapBase::EnablePlayBackTransparency
LBitmapBase::SetPlayBackTransparentColor
LBitmapBase::GetPlayBackTransparentColor
LBitmapBase::IsPixelsSigned
LBitmapBase::GetDitheringMethod
LBitmapBase::SetDitheringMethod
LBitmapBase::GetPlayBackLeft
LBitmapBase::SetPlayBackLeft
LBitmapBase::GetPlayBackTop
LBitmapBase::SetPlayBackTop
LBitmapBase::GetPlayBackDisposalMethod
LBitmapBase::SetPlayBackDisposalMethod
LBitmapBase::GetPlayBackBackGroundColor
LBitmapBase::SetPlayBackBackGroundColor
LBitmapBase::SetPlayBackDelay
LBitmapBase::GetPlayBackDelay
LBitmapBase::IsInterlaced
LBitmapBase::GetPalette
LBitmapBase::SetPalette
LBitmapBase::IsSuperCompressed
Note: |
Fields intended for internal use, such as the pointer to the bitmap, are omitted from the table. If necessary, you can refer to the LTKRN.H header file which describes the entire structure. |
Member |
Data Type |
Description |
uStructSize |
Size of this structure in bytes. Use the sizeof() macro to calculate this value. |
|
Width |
Image width in pixels. |
|
Height |
Image height in pixels. |
|
BitsPerPixel |
Number of bits per pixel. |
|
BytesPerLine |
Bytes per line, rounded upward to the nearest multiple of four. |
|
Flags.Allocated |
TRUE if the bitmap is allocated. |
|
Flags.ConventionalMemory |
TRUE if the bitmap is allocated using conventional memory. |
|
Flags.DiskMemory |
TRUE if the bitmap is allocated using LEAD's own virtual memory. |
|
Flags.LockedMemory |
TRUE if the bitmap memory is locked down. |
|
Flags.Progressive |
TRUE if an image is being loaded from a progressive JPEG file. |
|
Flags.Tiled |
TRUE if the bitmap is a tiled bitmap. |
|
Flags.WaitUserInput |
TRUE if the animation playback waits for user input. |
|
Flags.Transparency |
TRUE if the animation playback uses transparency. |
|
Flags.Compressed |
TRUE if the current bitmap is in 1-bit RLE-compressed format. For information about this format, refer to Speeding Up 1-Bit Documents. |
|
Flags.Signed |
TRUE if the pixel values in the bitmap are signed. |
|
Flags.SuperCompressed |
TRUE if the bitmap is in super compressed format. The bitmap can be 24-bit or 1-bit. For more information, refer to Super Compressed Bitmaps. |
|
nColors |
Number of colors (256 or less) that the bitmap has. If the image has more than 256 colors, this value is zero. |
|
pPalette |
Array of palette colors. |
|
ViewPerspective |
Where the beginning of the image is stored. Valid values are TOP_LEFT, BOTTOM_LEFT, TOP_RIGHT, BOTTOM_RIGHT, TOP_LEFT90, and TOP_LEFT270. For descriptions, refer to Accounting for View Perspective. |
|
Order |
Color order of the bitmap. Possible values are: |
|
Size |
Deprecated, use the Size64 member. |
|
Size64 |
Size of the bitmap image data, in bytes. |
|
DitheringMethod |
Dithering method (referenced by some functions). For possible values, refer to the LBitmapSettings::DefaultDithering function. |
|
XResolution |
Horizontal resolution, in dots per inch. Some file formats save this value in the file header. |
|
YResolution |
Vertical resolution, in dots per inch. Some file formats save this value in the file header. |
|
Left |
Left offset for animation playback. |
|
Top |
Top offset for animation playback, based on a TOP_LEFT view perspective. |
|
Delay |
Animation playback delay in milliseconds (ms). |
|
Background |
Background color for animation playback. You can specify a COLORREF value, such as the return value of the Windows RGB macro, or you can use the PALETTEINDEX macro to specify a palette color. |
|
Transparency |
Transparent color for animation playback. You can specify a COLORREF value, such as the return value of the Windows RGB macro, or you can use the PALETTEINDEX macro to specify a palette color. |
|
DisposalMethod |
Animation playback disposal method. For possible values, refer to Animation Disposal Methods. |
|
LowBit |
Value indicating the low bit used for window leveling. 0 <= nLowBit <= nHighBit <= (11 for 12-bit grayscale or 15 for 16-bit grayscale). A value of -1 will be treated as 0. |
|
HighBit |
Value indicating the high bit used for window leveling. 0 <= nLowBit <= nHighBit <= (11 for 12-bit grayscale or 15 for 16-bit grayscale). A value of -1 will be treated as BitsPerPixel -1. |
|
MinVal |
Minimum grayscale value. For every value between 0 and MinVal, Black (RGB(0,0,0)) will be used. For values between MinVal and MaxVal, the gray value to be displayed is calculated by : gray = (index - MinVal) * 255 / (MaxVal - MinVal).(See * below) |
|
MaxVal |
Maximum grayscale value. For every value larger than MaxVal, White (RGB(255,255,255)) will be used. For values between MinVal and MaxVal, the gray value to be displayed is calculated by : gray = (index - MinVal) * 255 / (MaxVal - MinVal). (See * below) |
* index is the intensity value of the pixel. If the intensity value is > MaxVal, the color will be White. If the intensity value is < MinVal, the color will be Black. For those intensity values between MinVal and MaxVal, the above equation is used to determine the color, with index equal to the intensity value.
pBITMAPHANDLE is a pointer to a BITMAPHANDLE structure. Generally, where a function parameter type is pBITMAPHANDLE, you can declare a BITMAPHANDLE variable, update the structure's fields, and pass the variable's address in the parameter. Declaring a pBITMAPHANDLE variable is necessary only if your program requires a pointer.
Some functions which take this structure as a parameter require that the structure be initialized prior to the function call. You must set the uStructSize member to the total size, in bytes, of the structure. Use the sizeof() macro to calculate this value. Functions that do not require the structure to be initialized will take the total size of the structure, in bytes, as an additional function parameter.
In most cases, the values of fields in the BITMAPHANDLE structure are maintained by LEADTOOLS functions.
Support for super compressing bitmaps is available only in the Document/Medical toolkits.
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET