L_InitICCProfileExt

#include "ltkrn.h"
#include "ltclr.h"

L_LTCLR_API L_INT L_InitICCProfileExt(pICCProfile, uStructSize)

pICCPROFILEEXT pICCProfile;

/* pointer to a structure */

L_SIZE_T uStructSize;

/* size of a structure */

Initializes an ICCPROFILEEXT structure.

Parameter

Description

pICCProfile

Pointer to the ICCPROFILEEXT structure to initialize.

uStructSize

Value that indicates the size of the structure pointed to by pICCProfile. Pass sizeof(ICCPROFILEEXT).

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

The parameter pICCProfile must be allocated before sending it to the function.

An ICCPROFILEEXT structure must be initialized before loading an ICC Profile. To initialize an ICCPROFILEEXT structure, call L_InitICCProfileExt with the uStructSize parameter set to sizeof(MEMICCPROFILEEXT).

This function should be called before calling L_InitICCHeader. If this function is called after L_InitICCHeader, the default values set by L_InitICCHeader will be lost.

When the ICCPROFILEEXT structure is no longer needed, be sure to free the memory allocated by calling L_FreeICCProfileExt.

Required DLLs and Libraries

LTCLR

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_LoadICCProfile, L_FreeICCProfileExt, L_SaveICCProfile, L_LoadICCProfileExt, L_FillICCProfileStructure, L_FillICCProfileFromICCFile, L_InitICCHeader, L_SetICCCMMType, L_SetICCDeviceClass, L_SetICCColorSpace, L_SetICCConnectionSpace, L_SetICCPrimaryPlatform, L_SetICCFlags, L_SetICCDevManufacturer, L_SetICCDevModel, L_SetICCDeviceAttributes, L_SetICCRenderingIntent, L_SetICCCreator, L_SetICCDateTime, L_2bFixed2bNumberToDouble, L_DoubleTo2bFixed2bNumber, L_SetICCTagData, L_GetICCTagData, L_CreateICCTagData, L_DeleteICCTag, L_GenerateICCFile, L_GenerateICCPointer, L_GetICCTagTypeSig, L_FreeICCTagType

Topics:

Using ICC Profile Functions

 

ICC Profile Functions: Creating an ICC Profile

Example

This example loads an ICC Profile from an Image, fill the Icc structure with it, and then saves the profile into another image.

L_VOID InitICCProfileExtExample(pICCPROFILEEXT pIccProfile,
                                L_TCHAR      * pszImage1,
                                L_TCHAR      * pszImage2)
{
   // Load an ICC Profile that is embedded in an image
   L_LoadICCProfileExt(pszImage1, pIccProfile, NULL);
   // Fill the ICCPROFILEEXT structure with the ICC data loaded from the image
   L_FillICCProfileStructure(pIccProfile, pIccProfile->pData, pIccProfile->uDataSize);
   // Save the ICC Profile into another image
   L_SaveICCProfile(pszImage2, pIccProfile, NULL);
}