L_CopyBitmapPalette

#include "l_bitmap.h"

L_INT EXT_FUNCTION L_CopyBitmapPalette(pBitmapDst, pBitmapSrc)

pBITMAPHANDLE pBitmapDst;

/* pointer to the destination bitmap handle */

pBITMAPHANDLE pBitmapSrc;

/* pointer to the source bitmap handle */

Copies the palette of a source bitmap and places it into a destination bitmap. Only the palette field of the bitmap handle is copied.

Parameter

Description

pBitmapDst

Pointer to the destination bitmap handle into which the palette will be copied. You must have a valid image loaded into the bitmap for this function to work.

pBitmapSrc

Pointer to the source bitmap handle. You must have a valid image loaded into the bitmap for this function to work.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

The destination bitmap must be allocated and must be 8-bit or less before this function is called. The source bitmap and destination bitmap must have the same bits per pixel. The destination bitmap’s existing palette will be destroyed before the copy is made. When the destination bitmap is freed, the palette will also be destroyed.

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

Windows 95 / 98 / Me, Windows 2000 / XP, Windows CE.

See Also

Functions:

L_CopyBitmapData, L_CopyBitmapHandle, L_CopyBitmapRect, L_CopyBitmap, L_DupBitmapPalette

Topics:

Raster Image Functions: Copying Images

 

Raster Image Functions: Palettes

 

Raster Image Functions: Using the Clipboard

Example

For an example, refer to L_ResizeBitmap.