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

L_VOID Test()
{
   L_INT nRet = 0 ; 
   /* 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*/
   LICCProfile IccProfile; 
   // Initialize the profile
   nRet = IccProfile.Initialize ();
   // Initialize the header
   nRet = IccProfile.InitHeader();
   // Set the CMM type to zero
   nRet = IccProfile.SetCMMType (0); 
   // Set the Device Class to Input Class
   nRet = IccProfile.SetDeviceClass (InputClass); 
   // Set the Color Space to RGB
   nRet = IccProfile.SetColorSpace (RgbData); 
   // Set the PCS to XYZ
   nRet = IccProfile.SetConnectionSpace (XyzData); 
   // Set the primary platform to zero
   nRet = IccProfile.SetPrimaryPlatform (NoPlatformSignature); 
   // Set the profile flags into not embedded, and independent
   nRet = IccProfile.SetFlags (ICC_EMBEDDED_PROFILE_FALSE|ICC_USE_ANYWHERE); 
   // Set the device manufacturer signature to zero
   nRet = IccProfile.SetDevManufacturer (0); 
   // Set the device model to 0
   nRet = IccProfile.SetDevModel (0); 
   // 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); 
   // Set the profile rendering intent
   nRet = IccProfile.SetRenderingIntent (Perceptual); 
   // Set the profile creator to 0
   nRet = IccProfile.SetCreator (0); 
   // Free the ICC profile
   IccProfile.Free ();
}