LICCProfile::InitHeader

#include "ltwrappr.h"

L_INT LICCProfile::InitHeader();

Initializes the ICC header with its default values.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

The header information is contained within the IccHeader member of the class object's ICCPROFILEEXT member structure. The class object should be initialized by calling LICCProfile::Initialize, before calling this function. This function initializes the IccHeader member of the class object's ICCPROFILEEXT member structure with its default values. It must be called before filling any of the header fields. Once the header fields have been initialized, they can be set using the following functions:

LICCProfile::SetCMMType

LICCProfile::SetColorSpace

LICCProfile::SetConnectionSpace

LICCProfile::SetCreator

LICCProfile::SetDateTime

LICCProfile::SetDeviceAttributes

LICCProfile::SetDeviceClass

LICCProfile::SetDevManufacturer

LICCProfile::SetDevModel

LICCProfile::SetFlags

LICCProfile::SetPrimaryPlatform

LICCProfile::SetRenderingIntent

If this function is called after any of the functions listed above, the header fields will be re-initialized to their default values, and the individually set values will be lost.

LICCProfile::Initialize should be called before calling LICCProfile::InitHeader. If LICCProfile::Initialize is called after LICCProfile::InitHeader, the default values set by LICCProfile::InitHeader will be lost.

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::Initialize, LICCProfile::Free, LICCProfile::Save, LICCProfile::Load, LICCProfile::Fill, 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, goes through all the steps of initializing and filling the fields of the header, creates some tags, generates an ICC profile pointer, saves it into an ICC file, and then frees the ICC Profile

L_INT LICCProfile_InitHeaderExample() 
{ 
   L_INT nRet = FAILURE; 
   LICCProfile IccProfile; 
   // Initialize the ICC Profile 
   nRet = IccProfile.Initialize (); 
   if (nRet != SUCCESS) 
   { 
      IccProfile.Free (); 
      return nRet; 
   } 
   // Initialize the header 
   nRet = IccProfile.InitHeader(); 
   if (nRet != SUCCESS) 
   { 
      IccProfile.Free (); 
      return nRet; 
   } 
   // Set the CMM type to zero 
   nRet = IccProfile.SetCMMType (0); 
   if (nRet != SUCCESS) 
   { 
      IccProfile.Free (); 
      return nRet; 
   } 
   // Set the Device Class to Input Class 
   nRet = IccProfile.SetDeviceClass (InputClass); 
   if (nRet != SUCCESS) 
   { 
      IccProfile.Free (); 
      return nRet; 
   } 
   // Set the Color Space to RGB 
   nRet = IccProfile.SetColorSpace (RgbData); 
   if (nRet != SUCCESS) 
   { 
      IccProfile.Free (); 
      return nRet; 
   } 
   // Set the PCS to XYZ 
   nRet = IccProfile.SetConnectionSpace (XyzData); 
   if (nRet != SUCCESS) 
   { 
      IccProfile.Free (); 
      return nRet; 
   } 
   // Set the primary platform to zero 
   nRet = IccProfile.SetPrimaryPlatform (NoPlatformSignature); 
   if (nRet != SUCCESS) 
   { 
      IccProfile.Free (); 
      return nRet; 
   } 
   // Set the profile flags into not embedded, and independent 
   nRet = IccProfile.SetFlags (ICC_EMBEDDED_PROFILE_FALSE|ICC_USE_ANYWHERE); 
   if (nRet != SUCCESS) 
   { 
      IccProfile.Free (); 
      return nRet; 
   } 
   // Set the device manufacturer signature to zero 
   nRet = IccProfile.SetDevManufacturer (0); 
   if (nRet != SUCCESS) 
   { 
      IccProfile.Free (); 
      return nRet; 
   } 
   // Set the device model to 0 
   nRet = IccProfile.SetDevModel (0); 
   if (nRet != SUCCESS) 
   { 
      IccProfile.Free (); 
      return nRet; 
   } 
   // Set the device attributes to be reflective, glossy, positive and colored media 
   nRet = IccProfile.SetDeviceAttributes (ICC_REFLECTIVE|ICC_GLOSSY|ICC_MEDIA_POLARITY_POSITIVE|ICC_COLOR_MEDIA); 
   if (nRet != SUCCESS) 
   { 
      IccProfile.Free (); 
      return nRet; 
   } 
   // Set the profile rendering intent 
   nRet = IccProfile.SetRenderingIntent (Perceptual); 
   if (nRet != SUCCESS) 
   { 
      IccProfile.Free (); 
      return nRet; 
   } 
   // Set the profile creator to 0 
   nRet = IccProfile.SetCreator (0); 
   // 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