Products | Support | Send comments on this topic. | Email a link to this topic. | Back to Getting Started | Help Version 18.0.11.1
LEADTOOLS Raster Imaging C DLL Help

L_TranslateBitmapColor

Show in webframe

#include "l_bitmap.h"

L_LTKRN_API L_COLORREF L_TranslateBitmapColor(pBitmapDst, pBitmapSrc, crColor)

pBITMAPHANDLE pBitmapDst;

/* pointer to the destination bitmap handle */

pBITMAPHANDLE pBitmapSrc;

/* pointer to the source bitmap handle */

L_COLORREF crColor;

/* color in the source bitmap */

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

Parameter

Description

pBitmapDst

Pointer to the bitmap handle referencing the destination bitmap.

pBitmapSrc

Pointer to the bitmap handle referencing the source bitmap.

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

LTKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Platforms

Win32, x64, Linux.

See Also

Functions:

L_GetBitmapColors, L_PutBitmapColors, L_DupPalette

Topics:

Raster Image Functions: Creating and Maintaining Lists of Images

 

Raster Image Functions: Palettes

 

Color Resolution and Dithering

 

Implementing Animation

 

Using Color Values in LEADTOOLS

Example

For a short example, refer to L_GetBitmapListItem. For complete sample code, refer to the CHILD.C module of the DEMO example.

Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.