LFile::InitICCProfileExt
#include "ltwrappr.h"
#include "ltclr.h"
L_INT LFile::InitICCProfileExt(pICCProfile, uStructSize)
pICCPROFILEEXT pICCProfile; |
/* pointer to a structure */ |
L_UINT uStructSize; |
/* size of a structure */ |
Initializes an ICCPROFILEEXT structure.
Parameter |
Description |
pICCProfile |
Pointer to the ICCPROFILEEXT structure to initialize. |
uStructSize |
Value that indicates the size of the structure pointed to by pICCProfile. Pass sizeof(ICCPROFILEEXT). |
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Comments
The parameter pICCProfile must be allocated before sending it to the function.
An ICCPROFILEEXT structure must be initialized before loading an ICC Profile. To initialize an ICCPROFILEEXT structure, call LFile::InitICCProfileExt with the uStructSize parameter set to sizeof().
When the ICCPROFILEEXT structure is no longer needed, be sure to free the memory allocated by calling LFile::FreeICCProfileExt.
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. |
See Also
Functions: |
LFile::FreeICCProfile, LFile::InitICCProfile, LFile::LoadICCProfile, LFile::FreeICCProfileExt, LFile::SaveICCProfile, LFile::LoadICCProfileExt, Class Members |
Topics: |
|
|
Example
/* This example initializes an ICC Profile, and then loads
an ICC Profile from an Image, and after that it is freed */
L_VOID InitICCProfileExample(LFile& MyFile)
{
L_INT
nRet ;
ICCPROFILEEXT
iccProfile;
MyFile.SetFileName(TEXT("image1.jpg"));
//
Initialize the ICCPROFILEEXT structure
nRet
= MyFile.InitICCProfileExt( &iccProfile,
sizeof(ICCPROFILEEXT));
//
Load an ICC Profile that is embedded in an image
nRet
= MyFile.LoadICCProfileExt(
&iccProfile, NULL);
MyFile.SetFileName(TEXT("image2.jpg"));
//
Save the ICC Profile into another image
nRet
= MyFile.SaveICCProfile(
&iccProfile, NULL);
//
Free the ICCPROFILEEXT structure
nRet
= MyFile.FreeICCProfileExt(
&iccProfile);
}