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:
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
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);