LICCProfile::CreateTagData
#include "ltwrappr.h"
static L_INT LICCProfile::CreateTagData(pDestTagData, pSrcTagData, uTagTypeSig);
L_UCHAR * pDestTagData; |
/* pointer to the destination buffer */ |
L_UCHAR * pSrcTagData; |
/* pointer to the source buffer */ |
L_UINT32 uTagTypeSig; |
/* tag type signature */ |
Creates an ICC tag.
Parameter |
Description |
pDestTagData |
Pointer to a buffer to be updated with the newly created tag. |
pSrcTagData |
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 Endian format, into the ICC profile format, which is in big Endian format.
Before exiting the program, call LICCProfile::FreeTagType 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 LTFIL For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
See Also
Example
L_VOID Test()
{
L_INT nRet = 0 ;
/* This function will create a */
SYSTEMTIME SystemTime;
ICCTAG_DATE_TIME_TYPE IccSrcDateTimeType;
ICCTAG_DATE_TIME_TYPE IccDstDateTimeType;
// 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
nRet = LICCProfile::CreateTagData((L_UCHAR *) &IccDstDateTimeType, (L_UCHAR *) & IccSrcDateTimeType, DateTimeTypeSig);
// Freeing the tag type
LICCProfile::FreeTagType ((L_UCHAR *)(&IccDstDateTimeType), DateTimeTypeSig) ;
}