L_GetPNGTRNS

#include "l_bitmap.h"

L_LTFIL_API L_UINT L_GetPNGTRNS (pData)

L_UCHAR *pData;

/* pointer to a buffer */

Gets the transparency data used by LEADTOOLS when loading PNG files.

Parameter

Description

pData

Pointer to a buffer to be updated with the transparency data used when loading PNG files.

Returns

0 or > 1

The length of the data buffer.

< 1

An error occurred. Refer to Return Codes.

Comments

This function supports1-bit to 8-bit PNG images.

To set the transparency data used when saving PNG files, use L_SetPNGTRNS function.

The transparency data obtained by this function is valid for the current thread.

Required DLLs and Libraries

LTFIL

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, Mobile.

See Also

Functions:

L_SetPNGTRNS, L_SetBitmapAlpha, L_CreateMaskFromBitmapRgn, L_SetBitmapRgnFromMask

Topics:

Raster Image Functions: Loading Files

 

Loading and Saving Images

 

PNG Files and Transparency

Example

//This example gets PNG transparency data

L_INT GetPNGTRNSExample(L_UCHAR * pData) 
{
   L_INT nRet; 
   nRet = L_GetPNGTRNS(pData); 
   return nRet; 
}