IccMAX 2.1.27
Color Profile Tools
|
#include <ctime>
#include <cstring>
#include <cmath>
#include "IccProfile.h"
#include "IccTag.h"
#include "IccArrayBasic.h"
#include "IccIO.h"
#include "IccUtil.h"
#include "IccMatrixMath.h"
#include "IccMD5.h"
Go to the source code of this file.
Functions | |
void | CalcProfileID (CIccIO *pIO, icProfileID *pProfileID) |
bool | CalcProfileID (const icChar *szFilename, icProfileID *pProfileID) |
static bool | compare_float (double x, double y, double eps=0.0000001f) |
static bool | compare_float (float x, float y, float eps=0.01f) |
CIccProfile * | OpenIccProfile (const icChar *szFilename, bool bUseSubProfile) |
CIccProfile * | OpenIccProfile (const icUInt8Number *pMem, icUInt32Number nSize, bool bUseSubProfile) |
CIccProfile * | ReadIccProfile (const icChar *szFilename, bool bUseSubProfile) |
CIccProfile * | ReadIccProfile (const icUInt8Number *pMem, icUInt32Number nSize, bool bUseSubProfile) |
bool | SaveIccProfile (const icChar *szFilename, CIccProfile *pIcc, icProfileIDSaveMethod nWriteId) |
bool | SaveIccProfile (FILE *f, CIccProfile *pIcc, icProfileIDSaveMethod nWriteId) |
CIccProfile * | ValidateIccProfile (CIccIO *pIO, std::string &sReport, icValidateStatus &nStatus) |
CIccProfile * | ValidateIccProfile (const icChar *szFilename, std::string &sReport, icValidateStatus &nStatus) |
CIccProfile * | ValidateIccProfile (const icUInt8Number *pMem, icUInt32Number nSize, std::string &sReport, icValidateStatus &nStatus) |
File: IccProfile.cpp
Contains: Implementation of the CIccProfile class.
Version: V1
Copyright: � see ICC Software License
Definition in file IccProfile.cpp.
void CalcProfileID | ( | CIccIO * | pIO, |
icProfileID * | pProfileID | ||
) |
Name: CalcProfileID
Purpose: Calculate the Profile ID using MD5 Fingerprinting method.
Args: pIO = The CIccIO object, pProfileID = array where the profileID will be stored
References CIccIO::GetLength(), icMD5Final(), icMD5Init(), icMD5Update(), icSeekSet, icProfileID::ID8, CIccIO::Read8(), CIccIO::Seek(), and CIccIO::Tell().
Referenced by CalcProfileID().
bool CalcProfileID | ( | const icChar * | szFilename, |
icProfileID * | pProfileID | ||
) |
Name: CalcProfileID
Purpose: Calculate the Profile ID using MD5 Fingerprinting method.
Args: szFileName = name of the file whose profile ID has to be calculated, pProfileID = array where the profileID will be stored
References CalcProfileID(), and CIccFileIO::Open().
|
inlinestatic |
|
inlinestatic |
CIccProfile * OpenIccProfile | ( | const icChar * | szFilename, |
bool | bUseSubProfile | ||
) |
Name: OpenIccProfile
Purpose: Open an ICC profile file. This will only read the profile header and tag directory. Loading of actual tags will be deferred until the tags are actually referenced by FindTag().
Args: szFilename - zero terminated string with filename of ICC profile to read bUseSubProfile - will attempt to open a subprofile if present
Return: Pointer to icc profile object, or NULL on failure
References CIccProfile, and CIccFileIO::Open().
Referenced by CIccDefaultEncProfileCacheHandler::GetEncodingProfile(), IccProfileOpenHandle(), main(), main(), main(), and main().
CIccProfile * OpenIccProfile | ( | const icUInt8Number * | pMem, |
icUInt32Number | nSize, | ||
bool | bUseSubProfile | ||
) |
Name: OpenIccProfile
Purpose: Open an ICC profile file. This will only read the profile header and tag directory. Loading of actual tags will be deferred until the tags are actually referenced by FindTag().
Args: pMem = pointer to memory containing profile data nSize = size of memory related to profile bUseSubProfile = flag to indicate that to use embedded subprofile
Return: Pointer to icc profile object, or NULL on failure
References CIccMemIO::Attach(), and CIccProfile.
Referenced by main(), and PrintIccProfileInfo().
CIccProfile * ReadIccProfile | ( | const icChar * | szFilename, |
bool | bUseSubProfile | ||
) |
Name: ReadIccProfile
Purpose: Read an ICC profile file.
Args: szFilename - zero terminated string with filename of ICC profile to read bUseSubProfile - will attempt to open a subprofile if present
Return: Pointer to ICC profile object, or NULL on failure
References CIccProfile, and CIccFileIO::Open().
Referenced by CIccPRMG::EvaluateProfile(), CIccEvalCompare::EvaluateProfile(), IccProfileReadHandle(), main(), and main().
CIccProfile * ReadIccProfile | ( | const icUInt8Number * | pMem, |
icUInt32Number | nSize, | ||
bool | bUseSubProfile | ||
) |
Name: ReadIccProfile
Purpose: Read an ICC profile file.
Args: pMem = pointer to memory containing profile data nSize = size of memory related to profile bUseSubProfile - will attempt to open a subprofile if present
Return: Pointer to icc profile object, or NULL on failure
References CIccMemIO::CIccMemIO(), CIccMemIO::Attach(), and CIccProfile.
bool SaveIccProfile | ( | const icChar * | szFilename, |
CIccProfile * | pIcc, | ||
icProfileIDSaveMethod | nWriteId | ||
) |
Name: SaveIccProfile
Purpose: Save an ICC profile file.
Args: szFilename - zero terminated string with filename of ICC profile to create
Return: true = success, false = failure
References CIccFileIO::Open().
Referenced by CDevLinkWriter::finish(), and main().
bool SaveIccProfile | ( | FILE * | f, |
CIccProfile * | pIcc, | ||
icProfileIDSaveMethod | nWriteId | ||
) |
Name: SaveIccProfile
Purpose: Save an ICC profile file.
Args: f - handle to file io stream (closed outside of this function)
Return: true = success, false = failure
References CIccFileIO::Attach(), and CIccFileIO::Detach().
CIccProfile * ValidateIccProfile | ( | CIccIO * | pIO, |
std::string & | sReport, | ||
icValidateStatus & | nStatus | ||
) |
Name: ValidateIccProfile
Purpose: Open an ICC profile file. This will only read the profile header and tag directory. Loading of actual tags will be deferred until the tags are actually referenced by FindTag().
Args: pIO - Handle to IO access object (Not ValidateIccProfile assumes ownership of this object) sReport - std::string to put report into nStatus - return status value
Return: Pointer to icc profile object, or NULL on failure
References CIccProfile, icMsgValidateCriticalError, and icValidateCriticalError.
CIccProfile * ValidateIccProfile | ( | const icChar * | szFilename, |
std::string & | sReport, | ||
icValidateStatus & | nStatus | ||
) |
Name: ValidateIccProfile
Purpose: Open an ICC profile file. This will only read the profile header and tag directory. Loading of actual tags will be deferred until the tags are actually referenced by FindTag().
Args: szFilename - zero terminated string with filename of ICC profile to read sReport - std::string to put report into nStatus - return status value
Return: Pointer to icc profile object, or NULL on failure
References CIccProfile, icMaxStatus(), icMsgValidateCriticalError, icValidateCriticalError, and CIccFileIO::Open().
Referenced by main().
CIccProfile * ValidateIccProfile | ( | const icUInt8Number * | pMem, |
icUInt32Number | nSize, | ||
std::string & | sReport, | ||
icValidateStatus & | nStatus | ||
) |
Name: ValidateIccProfile
Purpose: Open an ICC profile file. This will only read the profile header and tag directory. Loading of actual tags will be deferred until the tags are actually referenced by FindTag().
Args: pMem = pointer to memory containing profile data nSize = size of memory related to profile sReport - std::string to put report into nStatus - return status value
Return: Pointer to icc profile object, or NULL on failure
References CIccMemIO::Attach(), CIccProfile, icMaxStatus(), icMsgValidateCriticalError, and icValidateCriticalError.