L_SaveICCProfile

Summary

Saves (embeds) an ICC profile in an image file.

Syntax

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

L_LTCLR_API L_INT L_SaveICCProfile(pszFilename, pICCProfile, pSaveOptions)

Parameters

L_TCHAR* pszFilename

Character string containing the name of the file in which to save/embed an ICC profile.

pICCPROFILEEXT pICCProfile

Pointer to an ICCPROFILEEXT structure that contains the ICC profile to save/embed.

pSAVEFILEOPTION pSaveOptions

Pointer to optional extended save options. Pass NULL to use the default save options, and the profile will be saved on page 1.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

ICC profiles can be saved into JPEG, TIFF or GIF files. TIFF files are multipage, so the profile can be saved to a particular page using the pSaveOptions parameter.

Initialize the structure pointed to by pICCProfile first by calling L_InitICCProfile. If L_SaveICCProfile  succeeds, free the ICC profile by calling L_FreeICCProfile. In fact, when any ICCPROFILEEXT structure initialized by L_InitICCProfile is no longer needed, the memory must be freed by calling L_FreeICCProfile.

The pData member of the ICCPROFILEEXT structure points to one block of memory that contains the entire ICC profile. The uDataSize contains the size of the material pointed to by pData. As tags are added or deleted, these members are not automatically updated. Ordinarily, to update these members, you must call L_GenerateICCPointer.

And since L_SaveICCProfile depends on the values of pData and uDataSize, unless they already have correct data, they must be updated by calling L_GenerateICCPointer.

Required DLLs and Libraries

Platforms

Win32, x64.

See Also

Functions

Topics

Example

For an example, refer to L_InitICCProfile.

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

LEADTOOLS Color Conversion C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.