L_FreeICCProfile

#include "l_bitmap.h"

L_INT EXT_FUNCTION L_FreeICCProfile(pICCProfile)

pMEMICCPROFILE pICCProfile;

/* pointer to a structure */

Frees the memory allocated by L_InitICCProfile.

Parameter

Description

pICCProfile

Pointer to the MEMICCPROFILE structure to be freed.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

When the MEMICCPROFILE structure initialized by L_InitICCProfile is no longer needed, the memory must be freed by calling L_FreeICCProfile.

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

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

See Also

Functions:

L_LoadICCProfile, L_InitICCProfile

Topics:

Raster Image Functions: Loading Files

 

Loading and Saving Images

Example

// This example will extract an ICC profile embedded in a JPEG file.
MEMICCPROFILE iccProfile;

// initialize the MEMICCPROFILE structure
L_InitICCProfile
(&iccProfile, sizeof(MEMICCPROFILE));

// load the embedded ICC profile
if(L_LoadICCProfile(TEXT("embeddedICC.jpg"), &iccProfile, NULL) == SUCCESS)
{
   // use the ICC profile. Write your own MyCreateICMFile which
   // creates a file, writes the data into the file and close the file
   MyCreateICMFile(TEXT("ICC.ICM"), iccProfile.pData, iccProfile.uDataSize);

   // when finished, free the memory allocated by the MEMICCPROFILE structure
   L_FreeICCProfile(&iccProfile);
}