L_TranslateBitmapColor

#include "l_bitmap.h"

L_LTKRN_API L_COLORREF L_TranslateBitmapColor(pBitmapDst, pBitmapSrc, crColor)

Translates the specified color in the source bitmap, and returns the nearest matching color in the destination bitmap.

Parameters

pBITMAPHANDLE pBitmapDst

Pointer to the bitmap handle referencing the destination bitmap.

pBITMAPHANDLE pBitmapSrc

Pointer to the bitmap handle referencing the source bitmap.

L_COLORREF crColor

The COLORREF value that specifies the color in the source bitmap to be translated. You can get the value from a palette entry or by using L_GetPixelColor.

Returns

The COLORREF value or the palette index of the nearest matching color in the destination bitmap. If the destination bitmap is 8 bits per pixel or less, this is always the palette index. Otherwise, it is the COLORREF value.

Comments

When creating a target bitmap for animation, you can use this function to ensure that the correct color is specified as the background color.

Required DLLs and Libraries

Platforms

Win32, x64, Linux.

Help Version 20.0.2020.4.3
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C API Help