L_InitICCHeader

#include "ltkrn.h"
#include "ltclr.h"

L_INT EXT_FUNCTION L_InitICCHeader(pICCProfile)

pICCPROFILEEXT pICCProfile;

/* pointer to a structure */

Initializes the ICC header with its default values.

Parameter

Description

pICCProfile

Pointer to the ICCPROFILEEXT structure in which to initialize the header.

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 ICCPROFILEEXT structure. The ICCPROFILEECT should be initialized, by calling L_InitICCProfileExt, before calling this function. This function initializes the IccHeader member of the ICCPROFILEEXT 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:

L_SetICCCMMType

L_SetICCColorSpace

L_SetICCConnectionSpace

L_SetICCCreator

L_SetICCDateTime

L_SetICCDeviceAttributes

L_SetICCDeviceClass

L_SetICCDevManufacturer

L_SetICCDevModel

L_SetICCFlags

L_SetICCPrimaryPlatform

L_SetICCRenderingIntent

L_SetICCProfileId

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

L_InitICCProfileExt should be called before calling L_InitICCHeader. If L_InitICCProfileExt is called after L_InitICCHeader, the default values set by L_InitICCHeader will be lost.

Required DLLs and Libraries

LTCLR

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Platforms

Windows 95 / 98 / Me, Windows 2000 / XP, Windows CE.

See Also

Functions:

L_FreeICCProfile, L_InitICCProfile, L_LoadICCProfile, L_InitICCProfileExt, L_FreeICCProfileExt, L_SaveICCProfile, L_LoadICCProfileExt, L_FillICCProfileStructure, L_FillICCProfileFromICCFile, L_SetICCCMMType, L_SetICCDeviceClass, L_SetICCColorSpace, L_SetICCConnectionSpace, L_SetICCPrimaryPlatform, L_SetICCFlags, L_SetICCDevManufacturer, L_SetICCDevModel, L_SetICCDeviceAttributes, L_SetICCRenderingIntent, L_SetICCCreator, L_SetICCDateTime, L_2bFixed2bNumberToDouble, L_DoubleTo2bFixed2bNumber, L_SetICCTagData, L_GetICCTagData, L_CreateICCTagData, L_DeleteICCTag, L_GenerateICCFile, L_GenerateICCPointer, L_GetICCTagTypeSig, L_FreeICCTagType, L_SetICCProfileId, L_U8Fixed8NumberToDouble, L_DoubleToU8Fixed8Number, L_ConvertParametricCurveTypeToBuffer, L_ConvertCurveTypeToBuffer, L_ConvertCLUTToBuffer, L_GetParametricCurveNumberOfParameters

Topics:

Using ICC Profile Functions

 

ICC Profile Functions: Creating an ICC Profile

Example

/* This example, initializes an ICCPROFILEEXT structure, goes through all the steps of initializing and filling the fields of the header, creates some tags, generates ICC profile pointer, saves it into an ICC file, and then frees the ICCPROFILEEXT structure */
ICCPROFILEEXT iccProfile; 
// Initialize the profile structure
L_InitICCProfileExt
 (&iccProfile, sizeof(ICCPROFILEEXT)); 
// Initialize the header
L_InitICCHeader
(&iccProfile); 
// Set the CMM type to zero
L_SetICCCMMType
 (&iccProfile, 0); 
// Set the Device Class to Input Class
L_SetICCDeviceClass
 (&iccProfile, InputClass); 
// Set the Color Space to RGB
L_SetICCColorSpace
 (&iccProfile, RgbData); 
// Set the PCS to XYZ
L_SetICCConnectionSpace
 (&iccProfile, XyzData); 
// Set the primary platform to zero
L_SetICCPrimaryPlatform
 (&iccProfile, 0); 
// Set the profile flags into not embedded, and independent
L_SetICCFlags
 (&iccProfile, ICC_EMBEDDED_PROFILE_FALSE | ICC_USE_ANYWHERE); 
// Set the device manufacturer signature to zero
L_SetICCDevManufacturer
 (&iccProfile, 0); 
// Set the device model to 0
L_SetICCDevModel
 (&iccProfile, 0); 
// Set the device attributes to be reflective, glossy, positive and colored media
L_SetICCDeciveAttributes(&iccProfile, ICC_REFLECTIVE | ICC_GLOSSY | ICC_MEDIA_POLARITY_POSITIVE | ICC_COLOR_MEDIA); 
// Set the profile rendering intent
L_SetICCRenderingIntent
 (&iccProfile, Perceptual); 
// Set the profile creator to 0
L_SetICCCreator
 (&iccProfile, 0); 
// Set the ICC Profile File ID
L_SetICCProfileID(&iccProfile);
// Free the ICCPROFILEEXT structure
L_FreeICCProfileExt
 (&iccProfile);