IccMAX 2.1.27
Color Profile Tools
|
#include <IccTagBasic.h>
Static Public Member Functions | |
static CIccTag * | Create (icTagTypeSignature sig) |
Data Fields | |
icUInt32Number | m_nReserved |
Protected Attributes | |
icColorSpaceSignature | m_csDevice |
icColorSpaceSignature | m_csPCS |
SIccNamedColorEntry * | m_NamedColor |
SIccNamedLabEntry * | m_NamedLab |
icUInt32Number | m_nColorEntrySize |
For quick response of repeated FindPCSColor. | |
icUInt32Number | m_nDeviceCoords |
icUInt32Number | m_nSize |
icUInt32Number | m_nVendorFlags |
icChar | m_szPrefix [32] |
icChar | m_szSufix [32] |
Class: CIccTagNamedColor2
Purpose: the NamedColor2 tag - an array of Named Colors
CIccTagNamedColor2::CIccTagNamedColor2 | ( | int | nSize = 1 , |
int | nDeviceCoords = 0 |
||
) |
Name: CIccTagNamedColor2::CIccTagNamedColor2
Purpose: Constructor
Args: nSize = number of named color entries, nDeviceCoords = number of device channels
References m_csDevice, m_csPCS, m_NamedColor, m_NamedLab, m_nColorEntrySize, m_nDeviceCoords, m_nSize, m_nVendorFlags, m_szPrefix, and m_szSufix.
CIccTagNamedColor2::CIccTagNamedColor2 | ( | const CIccTagNamedColor2 & | ITNC | ) |
Name: CIccTagNamedColor2::CIccTagNamedColor2
Purpose: Copy Constructor
Args: ITNC = The CIccTagNamedColor2 object to be copied
References m_csDevice, m_csPCS, m_NamedColor, m_NamedLab, m_nColorEntrySize, m_nDeviceCoords, m_nSize, m_nVendorFlags, m_szPrefix, and m_szSufix.
Referenced by NewCopy().
|
virtual |
Name: CIccTagNamedColor2::~CIccTagNamedColor2
Purpose: Destructor
References m_NamedColor, and m_NamedLab.
|
staticinherited |
Name: CIccTag::Create
Purpose: This is a static tag creator based upon tag signature type
Args: sig = tag type signature
Return: Pointer to Allocated tag
References CIccTagCreator::CreateTag().
Referenced by CIccDefaultEncProfileConverter::ConvertFromParams(), CIccTagStruct::LoadElem(), CIccProfileXml::ParseTag(), CIccTagXmlStruct::ParseTag(), CIccMpeXmlTintArray::ParseXml(), CIccTagXmlArray::ParseXml(), CIccMpeTintArray::Read(), CIccTagLutAtoB::Read(), CIccTagLut8::Read(), CIccTagLut16::Read(), CIccTagLut8::SetColorSpaces(), CIccTagLut16::SetColorSpaces(), and CIccProfileDescText::SetType().
|
virtual |
Name: CIccTagNamedColor2::Describe
Purpose: Dump data associated with the tag to a string
Args: sDescription - string to concatenate tag dump to
Reimplemented from CIccTag.
References SIccNamedColorEntry::deviceCoords, icColorIndexName(), icColorValue(), icSigLabData, m_csDevice, m_csPCS, m_NamedColor, m_nColorEntrySize, m_nDeviceCoords, m_nSize, m_nVendorFlags, m_szPrefix, m_szSufix, SIccNamedColorEntry::pcsCoords, and SIccNamedColorEntry::rootName.
|
inlinevirtualinherited |
Function: ReadAll() - Read All sub data for tag from file. Called by CIccProfile::ReadAll() to read all sub data for tag
Returns true if ReadAll is successful.
icInt32Number CIccTagNamedColor2::FindCachedPCSColor | ( | icFloatNumber * | pPCS, |
icFloatNumber | dMinDE = 1000.0 |
||
) | const |
Name: CIccTagNamedColor2::FindPCSColor
Purpose: Find the PCS color within the specified deltaE
Args: pPCS = PCS co-ordinates, dMinDE = the minimum deltaE (tolerance)
Return: Index of the named color array where the PCS color was found, if the color was not found within the tolerance -1 is returned
References icDeltaE(), icLabFromPcs(), icSigLabData, icXyzFromPcs(), icXYZtoLab(), SIccNamedLabEntry::lab, Lab2ToLab4(), m_csPCS, m_NamedLab, and m_nSize.
Referenced by FindPCSColor().
icInt32Number CIccTagNamedColor2::FindColor | ( | const icChar * | szColor | ) | const |
Name: CIccTagNamedColor2::FindColor
Purpose: Find the color with given name
Args: szColor = the color name
Return: Index of the named color array where the color name was found, if the color was not found -1 is returned
References m_NamedColor, m_nSize, m_szPrefix, m_szSufix, and SIccNamedColorEntry::rootName.
icInt32Number CIccTagNamedColor2::FindDeviceColor | ( | icFloatNumber * | pDevColor | ) | const |
Name: CIccTagNamedColor2::FindDeviceColor
Purpose: Find the device color
Args: pDevColor = device color co-ordinates
Return: Index of the named color array where the closest device color was found, if device representation is absent -1 is returned.
References SIccNamedColorEntry::deviceCoords, m_NamedColor, m_nDeviceCoords, and m_nSize.
icInt32Number CIccTagNamedColor2::FindPCSColor | ( | icFloatNumber * | pPCS, |
icFloatNumber | dMinDE = 1000.0 |
||
) |
Name: CIccTagNamedColor2::FindPCSColor
Purpose: Find the PCS color within the specified deltaE
Args: pPCS = PCS co-ordinates, dMinDE = the minimum deltaE (tolerance)
Return: Index of the named color array where the PCS color was found, if the color was not found within the tolerance -1 is returned
References FindCachedPCSColor(), InitFindCachedPCSColor(), and m_NamedLab.
icInt32Number CIccTagNamedColor2::FindRootColor | ( | const icChar * | szRootColor | ) | const |
Name: CIccTagNamedColor2::FindRootColor
Purpose: Find the root color name
Args: szRootColor = string containing the root color name to be found
Return: Index of the named color array where the root color name was found, if the color was not found -1 is returned
References m_NamedColor, m_nSize, and SIccNamedColorEntry::rootName.
|
inlinevirtual |
Reimplemented from CIccTag.
Reimplemented in CIccTagXmlNamedColor2.
bool CIccTagNamedColor2::GetColorName | ( | std::string & | sColorName, |
icInt32Number | index | ||
) | const |
Name: CIccTagNamedColor2::GetColorName
Purpose: Extracts the color name from the named color array
Args: sColorName = string where color name will be stored, index = array index of the color name
Return: true = if the index is within range, false = index out of range
References m_NamedColor, m_nColorEntrySize, m_nSize, m_szPrefix, m_szSufix, and SIccNamedColorEntry::rootName.
|
inline |
References m_nDeviceCoords.
|
inline |
References m_csDevice.
|
inline |
References m_NamedColor, and m_nColorEntrySize.
Referenced by CIccTagXmlNamedColor2::ToXml().
|
inlinevirtualinherited |
Reimplemented in CIccTagXmlUnknown, CIccTagXmlText, CIccTagXmlUtf8Text, CIccTagXmlZipUtf8Text, CIccTagXmlZipXml, CIccTagXmlUtf16Text, CIccTagXmlTextDescription, CIccTagXmlSignature, CIccTagXmlNamedColor2, CIccTagXmlXYZ, CIccTagXmlChromaticity, CIccTagXmlCicp, CIccTagXmlSparseMatrixArray, CIccTagXmlFixedNum< T, Tsig >, CIccTagXmlNum< T, A, Tsig >, CIccTagXmlFloatNum< T, A, Tsig >, CIccTagXmlMeasurement, CIccTagXmlMultiLocalizedUnicode, CIccTagXmlTagData, CIccTagXmlDateTime, CIccTagXmlColorantOrder, CIccTagXmlColorantTable, CIccTagXmlViewingConditions, CIccTagXmlSpectralDataInfo, CIccTagXmlSpectralViewingConditions, CIccTagXmlProfileSeqDesc, CIccTagXmlResponseCurveSet16, CIccTagXmlCurve, CIccTagXmlParametricCurve, CIccTagXmlSegmentedCurve, CIccTagXmlLutAtoB, CIccTagXmlLutBtoA, CIccTagXmlLut8, CIccTagXmlLut16, CIccTagXmlMultiProcessElement, CIccTagXmlProfileSequenceId, CIccTagXmlDict, CIccTagXmlStruct, CIccTagXmlArray, CIccTagXmlGamutBoundaryDesc, CIccTagXmlEmbeddedHeightImage, CIccTagXmlEmbeddedNormalImage, and CIccTagXmlEmbeddedProfile.
Referenced by icCurvesFromXml(), icCurvesToXml(), icProfDescToXml(), icXmlParseProfDesc(), CIccProfileXml::ParseTag(), CIccTagXmlStruct::ParseTag(), CIccMpeXmlTintArray::ParseXml(), CIccTagXmlArray::ParseXml(), CIccMpeXmlTintArray::ToXml(), CIccTagXmlStruct::ToXml(), CIccTagXmlArray::ToXml(), and CIccProfileXml::ToXmlWithBlanks().
|
inline |
|
inline |
References m_szPrefix.
|
inline |
|
inline |
|
inlinevirtualinherited |
Reimplemented in CIccTagArray.
References icSigUndefinedArray.
Referenced by icGetTagArrayHandlerOfType(), and CIccProfileXml::ParseTag().
|
inlinevirtualinherited |
Reimplemented in CIccTagStruct.
References icSigUndefinedStruct.
Referenced by icGetTagStructHandlerOfType(), CIccArrayColorantInfo::Validate(), and CIccArrayNamedColor::Validate().
|
inlinevirtual |
Function: GetType()
Purpose: Get Tag Type. Each derived tag will implement it's own GetType() function.
Reimplemented from CIccTag.
References icSigNamedColor2Type.
Referenced by Write().
|
inline |
References m_nVendorFlags.
bool CIccTagNamedColor2::InitFindCachedPCSColor | ( | ) |
Name: CIccTagNamedColor2::InitFindPCSColor
Purpose: Initialization needed for using FindPCSColor
Return: true if successfull, false if failure
References icLabFromPcs(), icSigLabData, icXyzFromPcs(), icXYZtoLab(), SIccNamedLabEntry::lab, Lab2ToLab4(), m_csPCS, m_NamedColor, m_NamedLab, m_nSize, and SIccNamedColorEntry::pcsCoords.
Referenced by FindPCSColor().
|
inlinevirtualinherited |
Reimplemented in CIccTagXYZ, CIccTagChromaticity, CIccTagSparseMatrixArray, CIccTagFixedNum< T, Tsig >, CIccTagNum< T, Tsig >, CIccTagFloatNum< T, Tsig >, and CIccTagData.
Referenced by MyTagDialog::MyTagDialog(), and DumpTag().
|
inlinevirtualinherited |
Reimplemented in CIccMBB.
Referenced by CIccProfileXml::ParseTag().
|
inlinevirtualinherited |
Reimplemented in CIccTagSparseMatrixArray, CIccTagFixedNum< T, Tsig >, CIccTagNum< T, Tsig >, and CIccTagFloatNum< T, Tsig >.
Referenced by CIccArrayNamedColor::FindDeviceColor(), CIccArrayNamedColor::FindPcsColor(), CIccArrayNamedColor::FindSpectralColor(), CIccTagStruct::GetElemNumberValue(), CIccStructNamedColor::GetNumArray(), CIccMpeXmlTintArray::ParseXml(), and CIccMpeTintArray::Read().
|
inlinevirtualinherited |
Function: IsSupported(size, pIO) - Check if tag fully supported for apply purposes. By Default inherited classes are supported. Unknown tag types are not supported.
Returns true if tag type is supported.
Reimplemented in CIccTagUnknown, CIccTagEmbeddedProfile, and CIccTagMultiProcessElement.
void CIccTagNamedColor2::Lab2ToLab4 | ( | icFloatNumber * | Dst, |
const icFloatNumber * | Src | ||
) | const |
Name: CIccTagNamedColor2::Lab2ToLab4
Purpose: Convert version 2 Lab to version 4 Lab
Args: Dst = array to store version 4 Lab coordinates, Src = array containing version 2 Lab coordinates
References UnitClip().
Referenced by FindCachedPCSColor(), InitFindCachedPCSColor(), and CIccTagXmlNamedColor2::ToXml().
void CIccTagNamedColor2::Lab4ToLab2 | ( | icFloatNumber * | Dst, |
const icFloatNumber * | Src | ||
) | const |
Name: CIccTagNamedColor2::Lab4ToLab2
Purpose: Convert version 4 Lab to version 2 Lab
Args: Dst = array to store version 2 Lab coordinates, Src = array containing version 4 Lab coordinates
Referenced by CIccTagXmlNamedColor2::ParseXml().
icFloatNumber CIccTagNamedColor2::NegClip | ( | icFloatNumber | v | ) | const |
Name: CIccTagNamedColor2::NegClip
Purpose: Negative numbers are clipped to zero
Args: v = number to be clipped
Return: Clipped number
|
inlinevirtual |
Function: NewCopy(sDescription) Each derived tag will implement it's own NewCopy() function.
Parameter(s): none
Returns a new CIccTag object that is a copy of this object.
Reimplemented from CIccTag.
References CIccTagNamedColor2().
CIccTagNamedColor2 & CIccTagNamedColor2::operator= | ( | const CIccTagNamedColor2 & | NamedColor2Tag | ) |
Name: CIccTagNamedColor2::operator=
Purpose: Copy Operator
Args: NamedColor2Tag = The CIccTagNamedColor2 object to be copied
References m_csDevice, m_csPCS, m_NamedColor, m_NamedLab, m_nColorEntrySize, m_nDeviceCoords, m_nSize, m_nVendorFlags, m_szPrefix, and m_szSufix.
|
inline |
References m_NamedColor, and m_nColorEntrySize.
|
virtual |
Name: CIccTagNamedColor2::Read
Purpose: Read in the tag contents into a data block
Args: size - # of bytes in tag, pIO - IO object to read tag from
Return: true = successful, false = failure
Reimplemented from CIccTag.
References SIccNamedColorEntry::deviceCoords, m_NamedColor, m_nColorEntrySize, CIccTag::m_nReserved, m_nVendorFlags, m_szPrefix, m_szSufix, SIccNamedColorEntry::pcsCoords, CIccIO::Read32(), CIccIO::Read8(), CIccIO::ReadUInt16Float(), SIccNamedColorEntry::rootName, and SetSize().
|
inlinevirtualinherited |
Function: Read(size, pIO) - Read tag from file. Each derived tag will implement it's own Read() function.
Parameter(s): size - number of bytes in tag including the type signature. pIO - IO object used to read in tag. The IO object should already be initialized to point to the begining of the tag.
Returns true if Read is successful.
Reimplemented in CIccTagEmbeddedProfile.
References CIccTag::Read().
|
inlinevirtualinherited |
Function: ReadAll() - Read All sub data for tag from file. Called by CIccProfile::ReadAll() to read all sub data for tag
Returns true if ReadAll is successful.
Reimplemented in CIccTagEmbeddedProfile.
void CIccTagNamedColor2::ResetPCSCache | ( | ) |
Call ResetPCSCache() if entry values change between calls to FindPCSColor()
Name: CIccTagNamedColor2::ResetPCSCache
Purpose: This function is called if entry values change between calls to FindPCSColor()
References m_NamedLab.
Referenced by SetSize().
|
virtual |
Name: CIccTagNamedColor2::SetColorSpaces
Purpose: Set the device and PCS color space of the tag
Args: csPCS = PCS color space signature, csDevice = Device color space signature
References m_csDevice, and m_csPCS.
Referenced by CIccProfileXml::ParseTag().
void CIccTagNamedColor2::SetPrefix | ( | const icChar * | szPrefix | ) |
Name: CIccTagNamedColor2::SetPrefix
Purpose: Set contents of suffix member field
Args: szPrefix - string to set prefix to
References m_szPrefix.
bool CIccTagNamedColor2::SetSize | ( | icUInt32Number | nSize, |
icInt32Number | nDeviceCoords = -1 |
||
) |
Name: CIccTagNamedColor2::SetSize
Purpose: Sets the size of the named color array.
Args: nSize - number of named color entries, nDeviceCoords - number of device channels
References SIccNamedColorEntry::deviceCoords, m_NamedColor, m_nColorEntrySize, m_nDeviceCoords, m_nSize, SIccNamedColorEntry::pcsCoords, ResetPCSCache(), and SIccNamedColorEntry::rootName.
Referenced by CIccTagXmlNamedColor2::ParseXml(), and Read().
void CIccTagNamedColor2::SetSufix | ( | const icChar * | szSufix | ) |
|
inline |
References m_nVendorFlags.
icFloatNumber CIccTagNamedColor2::UnitClip | ( | icFloatNumber | v | ) | const |
Name: CIccTagNamedColor2::UnitClip
Purpose: Clip number so that its between 0-1
Args: v = number to be clipped
Return: Clipped number
Referenced by Lab2ToLab4().
|
inlinevirtual |
|
virtual |
Name: CIccTagNamedColor2::Validate
Purpose: Check tag data validity.
Args: sig = signature of tag being validated, sReport = String to add report information to
Return: icValidateStatusOK if valid, or other error status.
Reimplemented from CIccTag.
References icHeader::colorSpace, CIccInfo::GetSigPathName(), icGetSpaceSamples(), icMaxStatus(), icMsgValidateNonCompliant, icMsgValidateWarning, icValidateNonCompliant, icValidateWarning, m_nDeviceCoords, m_nSize, and CIccTag::Validate().
|
virtual |
Name: CIccTagNamedColor2::Write
Purpose: Write the tag to a file
Args: pIO - The IO object to write tag to.
Return: true = succesful, false = failure
Reimplemented from CIccTag.
References SIccNamedColorEntry::deviceCoords, GetType(), m_NamedColor, m_nColorEntrySize, m_nDeviceCoords, CIccTag::m_nReserved, m_nSize, m_nVendorFlags, m_szPrefix, m_szSufix, SIccNamedColorEntry::pcsCoords, SIccNamedColorEntry::rootName, CIccIO::Write32(), CIccIO::Write8(), and CIccIO::WriteUInt16Float().
|
protected |
Referenced by CIccTagNamedColor2(), CIccTagNamedColor2(), Describe(), GetDeviceSpace(), operator=(), and SetColorSpaces().
|
protected |
|
protected |
|
protected |
|
protected |
For quick response of repeated FindPCSColor.
Referenced by CIccTagNamedColor2(), CIccTagNamedColor2(), Describe(), GetColorName(), GetEntry(), operator=(), operator[](), CIccTagXmlNamedColor2::ParseXml(), Read(), SetSize(), and Write().
|
protected |
|
inherited |
Referenced by CIccTag::CIccTag(), CIccTagMultiProcessElement::CIccTagMultiProcessElement(), CIccTagMultiProcessElement::CIccTagMultiProcessElement(), CIccTagMultiProcessElement::operator=(), CIccProfileXml::ParseTag(), CIccTagXmlStruct::ParseTag(), CIccMpeXmlTintArray::ParseXml(), CIccTagXmlArray::ParseXml(), CIccTagText::Read(), CIccTagUtf8Text::Read(), CIccTagZipUtf8Text::Read(), CIccTagUtf16Text::Read(), CIccTagTextDescription::Read(), CIccTagSignature::Read(), Read(), CIccTagXYZ::Read(), CIccTagChromaticity::Read(), CIccTagCicp::Read(), CIccTagSparseMatrixArray::Read(), CIccTagFixedNum< T, Tsig >::Read(), CIccTagNum< T, Tsig >::Read(), CIccTagFloatNum< T, Tsig >::Read(), CIccTagMeasurement::Read(), CIccTagMultiLocalizedUnicode::Read(), CIccTagData::Read(), CIccTagDateTime::Read(), CIccTagColorantOrder::Read(), CIccTagColorantTable::Read(), CIccTagViewingConditions::Read(), CIccTagProfileSeqDesc::Read(), CIccTagResponseCurveSet16::Read(), CIccTagSpectralDataInfo::Read(), CIccTagSpectralViewingConditions::Read(), CIccTagEmbeddedHeightImage::Read(), CIccTagEmbeddedNormalImage::Read(), CIccTagStruct::Read(), CIccTagArray::Read(), CIccTagDict::Read(), CIccTagCurve::Read(), CIccTagParametricCurve::Read(), CIccTagLutAtoB::Read(), CIccTagLut8::Read(), CIccTagLut16::Read(), CIccTagGamutBoundaryDesc::Read(), CIccTagMultiProcessElement::Read(), CIccTagProfileSequenceId::Read(), CIccTagEmbeddedProfile::Read(), CIccTag::Validate(), CIccTagText::Write(), CIccTagUtf8Text::Write(), CIccTagZipUtf8Text::Write(), CIccTagUtf16Text::Write(), CIccTagTextDescription::Write(), CIccTagSignature::Write(), Write(), CIccTagXYZ::Write(), CIccTagChromaticity::Write(), CIccTagCicp::Write(), CIccTagSparseMatrixArray::Write(), CIccTagFixedNum< T, Tsig >::Write(), CIccTagNum< T, Tsig >::Write(), CIccTagFloatNum< T, Tsig >::Write(), CIccTagMeasurement::Write(), CIccTagMultiLocalizedUnicode::Write(), CIccTagData::Write(), CIccTagDateTime::Write(), CIccTagColorantOrder::Write(), CIccTagColorantTable::Write(), CIccTagViewingConditions::Write(), CIccTagProfileSeqDesc::Write(), CIccTagResponseCurveSet16::Write(), CIccTagSpectralDataInfo::Write(), CIccTagSpectralViewingConditions::Write(), CIccTagEmbeddedHeightImage::Write(), CIccTagEmbeddedNormalImage::Write(), CIccTagStruct::Write(), CIccTagArray::Write(), CIccTagDict::Write(), CIccTagEmbeddedProfile::Write(), CIccTagCurve::Write(), CIccTagParametricCurve::Write(), CIccTagLutAtoB::Write(), CIccTagLut8::Write(), CIccTagLut16::Write(), CIccTagGamutBoundaryDesc::Write(), CIccTagMultiProcessElement::Write(), and CIccTagProfileSequenceId::Write().
|
protected |
|
protected |
|
protected |
|
protected |