LICCProfile::Initialize

#include "ltwrappr.h"

L_INT LICCProfile::Initialize();

Initializes this class object.

Returns

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

LTCLR

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.

See Also

Functions:

LICCProfile::Load, LICCProfile::Free, LICCProfile::Save, LICCProfile::Fill, LICCProfile::InitHeader, LICCProfile::SetCMMType, LICCProfile::SetDeviceClass, LICCProfile::SetColorSpace, LICCProfile::SetConnectionSpace, LICCProfile::SetPrimaryPlatform, LICCProfile::SetFlags, LICCProfile::SetDevManufacturer, LICCProfile::SetDevModel, LICCProfile::SetDeviceAttributes, LICCProfile::SetRenderingIntent, LICCProfile::SetCreator, LICCProfile::SetDateTime, LICCProfile::Convert2bFixed2bNumberToDouble, LICCProfile::ConvertDoubleTo2bFixed2bNumber, LICCProfile::SetTagData, LICCProfile::GetTagData, LICCProfile::CreateTagData, LICCProfile::DeleteTag, LICCProfile::GenerateFile, LICCProfile::GeneratePointer, LICCProfile::GetTagTypeSig, LICCProfile::FreeTagType, Class Members

Topics:

Using ICC Profile Functions

 

ICC Profile Functions: Creating an ICC Profile

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 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Color Conversion C++ Class Library Help