L_CreateICCTagData
#include "ltkrn.h"
#include "ltclr.h"
L_INT EXT_FUNCTION L_CreateICCTagData(pDestTagData, pSrcTagData, uTypeSig)
/* pointer to a destination buffer */ | |
/* pointer to a source buffer */ | |
L_UINT32 uTypeSig; |
/* 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. |
uTypeSig |
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 L_FreeICCTagType 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
Example
/* This function will create a */
SYSTEMTIME systemTime;
ICCTAG_DATE_TIME_TYPE iccSrcDateTimeType;
ICCTAG_DATE_TIME_TYPE iccDstDateTimeType;
// Preparing the structure
GetSystemDate(&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
L_CreateICCTagData((L_UCHAR L_FAR *) &iccDstDateTimeType, (L_UCHAR L_FAR *) & iccSrcDateTimeType, DateTimeTypeSig);
// Freeing the tag type
L_FreeICCTagData((L_UCHAR L_FAR *) &iccDstDateTimeType) ;