L_InitICCHeader

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

L_LTCLR_API L_INT 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_InitICCProfile, 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

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_InitICCProfile should be called before calling L_InitICCHeader. If L_InitICCProfile is called after L_InitICCHeader, the default values set by L_InitICCHeader will be lost.

Platforms

Win32, x64.

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

Win32, x64.

See Also

Functions:

L_InitICCProfile, L_FreeICCProfile, L_SaveICCProfile, L_LoadICCProfile, 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_SetICCProfileId, L_2bFixed2bNumberToDouble, L_U8Fixed8NumberToDouble, L_DoubleToU8Fixed8Number, L_DoubleTo2bFixed2bNumber, L_SetICCTagData, L_GetICCTagData, L_CreateICCTagData, L_DeleteICCTag, L_GenerateICCFile, L_GenerateICCPointer, L_GetICCTagTypeSig, L_FreeICCTagType, 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 returns the ICCPROFILEEXT structure.

L_INT InitICCHeaderExample(pICCPROFILEEXT pIccProfile) 
{ 
   L_INT nRet; 
   // Initialize the header 
   nRet = L_InitICCHeader(pIccProfile); 
   if(nRet != SUCCESS) 
      return nRet; 
   // Set the CMM type to zero 
   nRet = L_SetICCCMMType (pIccProfile, 0); 
   if(nRet != SUCCESS) 
      return nRet; 
   // Set the Device Class to Input Class 
   nRet = L_SetICCDeviceClass (pIccProfile, InputClass); 
   if(nRet != SUCCESS) 
      return nRet; 
   // Set the Color Space to RGB 
   nRet = L_SetICCColorSpace (pIccProfile, RgbData); 
   if(nRet != SUCCESS) 
      return nRet; 
   // Set the PCS to XYZ 
   nRet = L_SetICCConnectionSpace (pIccProfile, XyzData); 
   if(nRet != SUCCESS) 
      return nRet; 
   // Set the primary platform to zero 
   nRet = L_SetICCPrimaryPlatform (pIccProfile, NoPlatformSignature); 
   if(nRet != SUCCESS) 
      return nRet; 
   // Set the profile flags into not embedded, and independent 
   nRet = L_SetICCFlags (pIccProfile, ICC_EMBEDDED_PROFILE_FALSE | ICC_USE_ANYWHERE); 
   if(nRet != SUCCESS) 
      return nRet; 
   // Set the device manufacturer signature to zero 
   nRet = L_SetICCDevManufacturer (pIccProfile, 0); 
   if(nRet != SUCCESS) 
      return nRet; 
   // Set the device model to 0 
   nRet = L_SetICCDevModel (pIccProfile, 0); 
   if(nRet != SUCCESS) 
      return nRet; 
   // Set the device attributes to be reflective, glossy, positive and colored media 
   nRet = L_SetICCDeviceAttributes(pIccProfile, ICC_REFLECTIVE | ICC_GLOSSY | ICC_MEDIA_POLARITY_POSITIVE | ICC_COLOR_MEDIA); 
   if(nRet != SUCCESS) 
      return nRet; 
   // Set the profile rendering intent 
   nRet = L_SetICCRenderingIntent (pIccProfile, Perceptual); 
   if(nRet != SUCCESS) 
      return nRet; 
   // Set the profile creator to 0 
   nRet = L_SetICCCreator (pIccProfile, 0); 
   return SUCCESS; 
} 

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