L_ChangeFromDIB

#include "l_bitmap.h"

L_LTKRN_API L_INT L_ChangeFromDIB(pBitmap, uStructSize, hDIB)

pBITMAPHANDLE pBitmap;

/* address of the LEAD bitmap handle */

L_UINT uStructSize;

/* size in bytes, of the structure pointed to by pBitmap */

L_HDIB hDIB;

/* DIB handle to be changed */

Changes a Windows device independent bitmap (DIB) to a LEAD bitmap. This function results in only one copy of the bitmap, and it invalidates the DIB handle.

Parameter

Description

pBitmap

Address of the LEAD bitmap handle.

uStructSize

Size in bytes, of the structure pointed to by pBitmap, for versioning. Use sizeof(BITMAPHANDLE).

hDIB

The DIB handle to be changed.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

This function does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this function.

Before calling this function, you must declare the LEAD bitmap handle, but you should not allocate the bitmap, because the new bitmap handle will point to the previous DIB data after the function is called. (If the bitmap is already allocated, you must free it.)

This function supports the standard DIB formats (BI_RGB and BI_BITFIELDS) as well as some FOURCC (Four Character Code) formats that some capture cards output.

These are the FOURCC that LEADTOOLS supports at the moment:

YVU9 (YUV9), I420 (YUV12), YUV2 , YV12 , IF09 , IYUV , UYVY , cyuv, YUY2, YVYU, Y41P, Y211, Y41T, Y42T

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 2000 / XP/Vista, Windows CE.

See Also

Functions:

L_ConvertFromDDB, L_ConvertFromDIB, L_ConvertToDDB, L_ConvertToDIB, L_ChangeFromDDB, L_ChangeToDDB, L_ChangeToDIB

Topics:

Raster Image Functions: Creation, Deletion, and Copying

 

Using DIBs, DDBs, and the Clipboard

Example

For an example, refer to L_ChangeToDIB.