#include "l_bitmap.h"
L_LTDIS_API L_HPALETTE L_CreatePaintPalette(hDC, pBitmap)
Returns a palette handle that must be selected and realized before calling the L_PaintDC function.
Device context that is used.
Pointer to the LEAD bitmap handle that references the image data.
Value | Meaning |
---|---|
> 0 | Palette handle. |
NULL | No palette needed. |
You must use this function if either the display device or the bitmap is 8 bits per pixel or less. You can use this function whenever the bitmap or device changes, and check the return value to decide whether to select and realize the palette. If the return value is NULL, no palette needs to be selected.
You must also call this function before calling L_PaintDC, when painting a 16-bit grayscale image on a 24-bit device.
You must delete the palette handle when it is no longer needed.
GDI+ paint does not require a palette. If the current paint display mode is set to GDI+ using L_SetDisplayMode with the DISPLAYMODE_GDIPLUS flag, then this function will always return NULL for the palette even if the bitmap is 8 bits per pixel or less.
Required DLLs and Libraries
Win32, x64, Linux.
For an example, refer to L_PaintDC. For complete sample code, refer to the COLOR example.
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document