L_SetICCTagData

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

L_LTCLR_API L_INT L_SetICCTagData(pICCProfile, pTagData, uTagSig, uTagTypeSig)

pICCPROFILEEXT pICCProfile;

/* pointer to a structure */

L_UCHAR* pTagData;

/* pointer to a buffer containing data */

L_UINT uTagSig;

/* a value that indicates the tag signature */

L_UINT uTagTypeSig;

/* a value that indicates the tag type signature */

Sets a tag inside the ICC profile.

Parameter

Description

pICCProfile

Pointer to the ICCPROFILEEXT structure in which to set the tag.

pTagData

Pointer to a buffer that contains the tag data.

uTagSig

A value that indicates the signature of the tag to be created. Possible values include private tags and the values listed in ICCTAGSIGNATURE. Signatures of private tags must be registered with the ICC.

uTagTypeSig

A value that indicates the signature of the tag type used for creating the tag. Possible values include private tag type signatures and the values listed in ICCTAGTYPESIGNATURE. Signatures of private tag types must be registered with the ICC.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

The pTagData pointer should be a pointer to a structure that contains all the data required for the tag to be created. This structure should be of the same type as the ICC tag type required for the tag to be created. In case of a private tag type, the pTagData must point to a structure of type ICCTAG_UNKNOWN_TYPE.

If only the tag is private, this function returns ERROR_ICC_UNKNOWN_TAG. If only the tag type is private, this function returns ERROR_ICC_UNKNOWN_TYPE. If both the tag and the type are private, this function returns ERROR_ICC_UNKNOWN_TAG_AND_TYPE. In all three of these cases however, the tag is set correctly in the ICC profile.

To add multiple tags to a profile, call this function repeatedly. Each subsequent tag added is appended to the list of tags pointed to by the pTagData member of the ICC profile structure.

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.

See Also

Functions:

L_InitICCProfile, L_FreeICCProfile, L_SaveICCProfile, L_LoadICCProfile, L_FillICCProfileStructure, L_FillICCProfileFromICCFile, L_InitICCHeader, 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_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: Tags

Example

This example sets a tag into an ICC profile.

L_INT SetICCTagDataExample(pICCPROFILEEXT pIccProfile)
{
   L_INT nRet;
   SYSTEMTIME systemTime; 
   ICCTAG_DATE_TIME_TYPE iccDateTimeType; 

   // preparing the structure
   GetSystemTime(&systemTime); 
   iccDateTimeType.DateTime.uYear = systemTime.wYear; 
   iccDateTimeType.DateTime.uMonth = systemTime.wMonth; 
   iccDateTimeType.DateTime.uDay = systemTime.wDay; 
   iccDateTimeType.DateTime.uHours = systemTime.wHour; 
   iccDateTimeType.DateTime.uMinutes = systemTime.wMinute; 
   iccDateTimeType.DateTime.uSeconds = systemTime.wSecond; 

   // setting the tag inside the ICC profile
   nRet = L_SetICCTagData(pIccProfile, (L_UCHAR *) &iccDateTimeType, CalibrationDateTimeTag, DateTimeTypeSig); 
   if(nRet != SUCCESS)
      return nRet;
   return SUCCESS;
}