Generates a block of memory that contains all the ICC profile data in big Endian format.
#include "ltwrappr.h"
L_INT LICCProfile::GeneratePointer()
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
The block of memory generated by this function can be accessed through the pData field inside the class object's ICCPROFILEEXT member structure. Its size is stored in the uDataSize field of the same structure.
This example will generate an ICC profile pointer
L_INT LICCProfile_GeneratePointerExample(L_TCHAR* szFileName)
{
L_INT nRet = FAILURE;
LICCProfile IccProfile;
// Initialize the ICC Profile
nRet = IccProfile.Initialize ();
if (nRet != SUCCESS)
{
IccProfile.Free ();
return nRet;
}
// Load an ICC Profile that is embedded in an image
nRet = IccProfile.Load (szFileName, NULL);
if (nRet != SUCCESS)
{
IccProfile.Free ();
return nRet;
}
// Fill the ICC Profile with the ICC data loaded from the image
nRet = IccProfile.Fill (IccProfile.GetProfile ()->pData, (L_UINT)(IccProfile.GetProfile()->uDataSize));
if (nRet != SUCCESS)
{
IccProfile.Free ();
return nRet;
}
// Generate a block of memory that contains all the ICC profile data in big Endian format
nRet = IccProfile.GeneratePointer();
// Free the ICC Profile
IccProfile.Free ();
return nRet;
}