L_CreateICCTagData

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

L_LTCLR_API L_INT L_CreateICCTagData(pDestTagData, pSrcTagData, uTagTypeSig)

L_UCHAR * pDestTagData;

/* pointer to a destination buffer */

L_UCHAR * pSrcTagData;

/* pointer to a source buffer */

L_UINT32 uTagTypeSig;

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

Creates an ICC tag.

Parameter

Description

pDestTagData

A pointer to a buffer to be updated with the newly created tag.

pSrcTagData

A pointer to a buffer that contains the original tag data.

uTagTypeSig

A value that indicates the signature of the tag type to be created. Possible values include private tag types and the values listed in ICCTAGTYPESIGNATURE.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

This function does not insert a tag into the ICC profile. It only creates a tag and updates the pDestTagData parameter with a pointer to the newly created tag. This is cast to the desired tag type.

This function converts the original source data, which is in little Indian format, into the ICC profile format, which is in big Indian format.

Before exiting the program, call L_FreeICCTagType, L_ConvertParametricCurveTypeToBuffer, L_ConvertCurveTypeToBuffer, L_ConvertCLUTToBuffer, L_GetParametricCurveNumberOfParameters to free the contents of the allocated pDestTagData. In addition, the user should free the pDestTagData pointer itself, since the user allocated it.

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_SetICCTagData, L_GetICCTagData, 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 function creates an icc tag type (dateTimeType) and returns it.

L_INT CreateICCTagDataExample(pICCTAG_DATE_TIME_TYPE pIccDstDateTimeType)
{
   SYSTEMTIME systemTime;
   ICCTAG_DATE_TIME_TYPE iccSrcDateTimeType;

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

   // Creating tag type data
   return L_CreateICCTagData((L_UCHAR *) pIccDstDateTimeType, (L_UCHAR *) &iccSrcDateTimeType, DateTimeTypeSig);
}