L_CreateICCTagData

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

L_LTCLR_API L_INT L_CreateICCTagData(pDestTagData, pSrcTagData, uTagTypeSig)

Creates an ICC tag.

Parameters

L_UCHAR * pDestTagData

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

L_UCHAR * pSrcTagData

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

L_UINT32 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

Value Meaning
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 Endian format, into the ICC profile format, which is in big Endian 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

Platforms

Win32, x64.

See Also

Functions

Topics

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

Help Version 21.0.2021.7.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Color Conversion C API Help

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.