#include "ltwrappr.h"
L_INT LICCProfile::Initialize();
Initializes this class object.
| Value | Meaning |
|---|---|
| SUCCESS | The function was successful. |
| < 1 | An error occurred. Refer to Return Codes. |
A LICCProfile class object must be initialized before loading an ICC Profile in it. To initialize a LICCProfile class object, call LICCProfile::Initialize.
This fuction must be called before calling any other ICC Profile functions.
This function should be called before calling LICCProfile::InitHeader. If this function is called after LICCProfile::InitHeader, the default values set by LICCProfile::InitHeader will be lost.
When the LICCProfile class object is no longer needed, the user must free the memory allocated by calling the LICCProfile::Free function.
Required DLLs and Libraries
This example initializes an ICC Profile, and then loads an ICC Profile from an Image, and after that it is freed
L_INT LICCProfile_InitializeExample(L_TCHAR* szInputFileName, L_TCHAR* szOutputFileName){L_INT nRet = FAILURE;LICCProfile IccProfile;// Initialize the ICC ProfilenRet = IccProfile.Initialize ();if (nRet != SUCCESS){IccProfile.Free ();return nRet;}// Load an ICC Profile that is embedded in an imagenRet = IccProfile.Load (szInputFileName, NULL);if (nRet != SUCCESS){IccProfile.Free ();return nRet;}// Fill the ICC Profile with the ICC data loaded from the imagenRet = IccProfile.Fill (IccProfile.GetProfile ()->pData, (L_UINT)(IccProfile.GetProfile()->uDataSize));if (nRet != SUCCESS){IccProfile.Free ();return nRet;}// Save the ICC Profile into another imagenRet = IccProfile.Save (szOutputFileName, NULL);// Free the ICC ProfileIccProfile.Free ();return nRet;}