LICCProfile::Initialize

Summary

Initializes this class object.

Syntax

#include "ltwrappr.h"

L_INT LICCProfile::Initialize();

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

A LICCProfile class object must be initialized before loading an ICC Profile in it. To initialize a LICCProfile class object, call LICCProfile::Initialize.

This function 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

See Also

Functions

Topics

Example

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 Profile 
   nRet = IccProfile.Initialize (); 
   if (nRet != SUCCESS) 
   { 
      IccProfile.Free (); 
      return nRet; 
   } 
 
   // Load an ICC Profile that is embedded in an image 
   nRet = IccProfile.Load (szInputFileName, NULL); 
   if (nRet != SUCCESS) 
   { 
      IccProfile.Free (); 
      return nRet; 
   } 
 
   // Fill the ICC Profile with the ICC data loaded from the image 
   nRet = IccProfile.Fill (IccProfile.GetProfile ()->pData, (L_UINT)(IccProfile.GetProfile()->uDataSize)); 
   if (nRet != SUCCESS) 
   { 
      IccProfile.Free (); 
      return nRet; 
   } 
 
   // Save the ICC Profile into another image 
   nRet = IccProfile.Save (szOutputFileName, NULL);  
   // Free the ICC Profile 
   IccProfile.Free (); 
   return nRet; 
} 

Help Version 22.0.2023.2.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Color Conversion C++ Class Library Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.