Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QIcc Namespace Reference

Classes

struct  CurvTagData
 
struct  DescTagData
 
struct  GenericTagData
 
struct  ICCProfileHeader
 
struct  Lut16TagData
 
struct  Lut8TagData
 
struct  mABTagData
 
struct  MatrixElement
 
struct  MlucTagData
 
struct  MlucTagRecord
 
struct  mpetTagData
 
struct  ParaTagData
 
struct  Sf32TagData
 
struct  TagEntry
 
struct  TagTableEntry
 
struct  XYZTagData
 

Enumerations

enum class  ColorSpaceType : quint32 { Rgb = IccTag('R', 'G', 'B', ' ') , Gray = IccTag('G', 'R', 'A', 'Y') , Cmyk = IccTag('C', 'M', 'Y', 'K') }
 
enum class  ProfileClass : quint32 {
  Input = IccTag('s', 'c', 'n', 'r') , Display = IccTag('m', 'n', 't', 'r') , Output = IccTag('p', 'r', 't', 'r') , ColorSpace = IccTag('s', 'p', 'a', 'c') ,
  DeviceLink = IccTag('l', 'i', 'n', 'k') , Abstract = IccTag('a', 'b', 's', 't') , NamedColor = IccTag('n', 'm', 'c', 'l')
}
 
enum class  Tag : quint32 {
  acsp = IccTag('a', 'c', 's', 'p') , Lab_ = IccTag('L', 'a', 'b', ' ') , RGB_ = IccTag('R', 'G', 'B', ' ') , XYZ_ = IccTag('X', 'Y', 'Z', ' ') ,
  rXYZ = IccTag('r', 'X', 'Y', 'Z') , gXYZ = IccTag('g', 'X', 'Y', 'Z') , bXYZ = IccTag('b', 'X', 'Y', 'Z') , rTRC = IccTag('r', 'T', 'R', 'C') ,
  gTRC = IccTag('g', 'T', 'R', 'C') , bTRC = IccTag('b', 'T', 'R', 'C') , kTRC = IccTag('k', 'T', 'R', 'C') , A2B0 = IccTag('A', '2', 'B', '0') ,
  A2B1 = IccTag('A', '2', 'B', '1') , A2B2 = IccTag('A', '2', 'B', '2') , B2A0 = IccTag('B', '2', 'A', '0') , B2A1 = IccTag('B', '2', 'A', '1') ,
  B2A2 = IccTag('B', '2', 'A', '2') , B2D0 = IccTag('B', '2', 'D', '0') , B2D1 = IccTag('B', '2', 'D', '1') , B2D2 = IccTag('B', '2', 'D', '2') ,
  B2D3 = IccTag('B', '2', 'D', '3') , D2B0 = IccTag('D', '2', 'B', '0') , D2B1 = IccTag('D', '2', 'B', '1') , D2B2 = IccTag('D', '2', 'B', '2') ,
  D2B3 = IccTag('D', '2', 'B', '3') , desc = IccTag('d', 'e', 's', 'c') , text = IccTag('t', 'e', 'x', 't') , cprt = IccTag('c', 'p', 'r', 't') ,
  curv = IccTag('c', 'u', 'r', 'v') , para = IccTag('p', 'a', 'r', 'a') , wtpt = IccTag('w', 't', 'p', 't') , bkpt = IccTag('b', 'k', 'p', 't') ,
  mft1 = IccTag('m', 'f', 't', '1') , mft2 = IccTag('m', 'f', 't', '2') , mluc = IccTag('m', 'l', 'u', 'c') , mpet = IccTag('m', 'p', 'e', 't') ,
  mAB_ = IccTag('m', 'A', 'B', ' ') , mBA_ = IccTag('m', 'B', 'A', ' ') , chad = IccTag('c', 'h', 'a', 'd') , gamt = IccTag('g', 'a', 'm', 't') ,
  sf32 = IccTag('s', 'f', '3', '2') , aarg = IccTag('a', 'a', 'r', 'g') , aagg = IccTag('a', 'a', 'g', 'g') , aabg = IccTag('a', 'a', 'b', 'g')
}
 

Functions

constexpr quint32 IccTag (uchar a, uchar b, uchar c, uchar d)
 
static int toFixedS1516 (float x)
 
static float fromFixedS1516 (int x)
 
static bool isValidIccProfile (const ICCProfileHeader &header)
 
static int writeColorTrc (QDataStream &stream, const QColorTrc &trc)
 
QByteArray toIccProfile (const QColorSpace &space)
 
static bool parseXyzData (const QByteArray &data, const TagEntry &tagEntry, QColorVector &colorVector)
 
static quint32 parseTRC (const QByteArrayView &tagData, QColorTrc &gamma, QColorTransferTable::Type type=QColorTransferTable::TwoWay)
 
template<typename T >
static void parseCLUT (const T *tableData, const float f, QColorCLUT *clut, uchar outputChannels)
 
static constexpr qsizetype intPow (qsizetype x, qsizetype exp)
 
template<typename T >
static bool parseLutData (const QByteArray &data, const TagEntry &tagEntry, QColorSpacePrivate *colorSpacePrivate, bool isAb)
 
static bool parseMabData (const QByteArray &data, const TagEntry &tagEntry, QColorSpacePrivate *colorSpacePrivate, bool isAb)
 
static bool parseA2B (const QByteArray &data, const TagEntry &tagEntry, QColorSpacePrivate *privat, bool isAb)
 
static bool parseDesc (const QByteArray &data, const TagEntry &tagEntry, QString &descName)
 
static bool parseRgbMatrix (const QByteArray &data, const QHash< Tag, TagEntry > &tagIndex, QColorSpacePrivate *colorspaceDPtr)
 
static bool parseGrayMatrix (const QByteArray &data, const QHash< Tag, TagEntry > &tagIndex, QColorSpacePrivate *colorspaceDPtr)
 
static bool parseChad (const QByteArray &data, const TagEntry &tagEntry, QColorSpacePrivate *colorspaceDPtr)
 
static bool parseTRCs (const QByteArray &data, const QHash< Tag, TagEntry > &tagIndex, QColorSpacePrivate *colorspaceDPtr, bool isColorSpaceTypeGray)
 
bool fromIccProfile (const QByteArray &data, QColorSpace *colorSpace)
 

Enumeration Type Documentation

◆ ColorSpaceType

enum class QIcc::ColorSpaceType : quint32
strong
Enumerator
Rgb 
Gray 
Cmyk 

Definition at line 62 of file qicc.cpp.

◆ ProfileClass

enum class QIcc::ProfileClass : quint32
strong
Enumerator
Input 
Display 
Output 
ColorSpace 
DeviceLink 
Abstract 
NamedColor 

Definition at line 68 of file qicc.cpp.

◆ Tag

enum class QIcc::Tag : quint32
strong
Enumerator
acsp 
Lab_ 
RGB_ 
XYZ_ 
rXYZ 
gXYZ 
bXYZ 
rTRC 
gTRC 
bTRC 
kTRC 
A2B0 
A2B1 
A2B2 
B2A0 
B2A1 
B2A2 
B2D0 
B2D1 
B2D2 
B2D3 
D2B0 
D2B1 
D2B2 
D2B3 
desc 
text 
cprt 
curv 
para 
wtpt 
bkpt 
mft1 
mft2 
mluc 
mpet 
mAB_ 
mBA_ 
chad 
gamt 
sf32 
aarg 
aagg 
aabg 

Definition at line 79 of file qicc.cpp.

Function Documentation

◆ fromFixedS1516()

static float QIcc::fromFixedS1516 ( int x)
static

Definition at line 270 of file qicc.cpp.

Referenced by isValidIccProfile(), parseChad(), parseLutData(), parseMabData(), parseTRC(), and parseXyzData().

+ Here is the caller graph for this function:

◆ fromIccProfile()

bool QIcc::fromIccProfile ( const QByteArray & data,
QColorSpace * colorSpace )

Definition at line 1252 of file qicc.cpp.

References QColorMatrix::chromaticAdaptation(), QColorSpace::Cmyk, Cmyk, QSet< T >::constEnd(), QSet< T >::constFind(), QColorSpace::Custom, QColorSpace::detach(), QColorSpace::ElementListProcessing, QColorSpacePrivate::get(), QColorSpace::Gray, Gray, header(), i, isValidIccProfile(), it, parseA2B(), parseChad(), parseDesc(), parseGrayMatrix(), parseRgbMatrix(), parseTRCs(), parseXyzData(), Q_ASSERT, qCDebug, qCWarning, QColorSpace::Rgb, Rgb, and QColorSpace::ThreeComponentMatrix.

Referenced by QColorSpace::fromIccProfile().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IccTag()

constexpr quint32 QIcc::IccTag ( uchar a,
uchar b,
uchar c,
uchar d )
constexpr

Definition at line 57 of file qicc.cpp.

References d, and IccTag().

Referenced by IccTag(), and toIccProfile().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ intPow()

static constexpr qsizetype QIcc::intPow ( qsizetype x,
qsizetype exp )
staticconstexpr

Definition at line 704 of file qicc.cpp.

References intPow().

Referenced by intPow(), and parseLutData().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isValidIccProfile()

static bool QIcc::isValidIccProfile ( const ICCProfileHeader & header)
static

Definition at line 275 of file qicc.cpp.

References Cmyk, ColorSpace, QColorVector::D50(), Display, fromFixedS1516(), Gray, header(), Input, Output, qCInfo, qCWarning, Rgb, and QColorVector::x.

Referenced by fromIccProfile(), and toIccProfile().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parseA2B()

static bool QIcc::parseA2B ( const QByteArray & data,
const TagEntry & tagEntry,
QColorSpacePrivate * privat,
bool isAb )
static

Definition at line 1050 of file qicc.cpp.

References parseMabData(), and qCWarning.

Referenced by fromIccProfile().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parseChad()

static bool QIcc::parseChad ( const QByteArray & data,
const TagEntry & tagEntry,
QColorSpacePrivate * colorspaceDPtr )
static

Definition at line 1159 of file qicc.cpp.

References chad, fromFixedS1516(), qCWarning, QColorMatrix::r, and QColorVector::x.

Referenced by fromIccProfile().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parseCLUT()

template<typename T >
static void QIcc::parseCLUT ( const T * tableData,
const float f,
QColorCLUT * clut,
uchar outputChannels )
static

Definition at line 683 of file qicc.cpp.

Referenced by parseLutData(), and parseMabData().

+ Here is the caller graph for this function:

◆ parseDesc()

static bool QIcc::parseDesc ( const QByteArray & data,
const TagEntry & tagEntry,
QString & descName )
static

Definition at line 1064 of file qicc.cpp.

References desc, QString::fromLatin1(), QString::fromUtf16(), mluc, Q_STATIC_ASSERT, and tag.

Referenced by fromIccProfile().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parseGrayMatrix()

static bool QIcc::parseGrayMatrix ( const QByteArray & data,
const QHash< Tag, TagEntry > & tagIndex,
QColorSpacePrivate * colorspaceDPtr )
static

Definition at line 1145 of file qicc.cpp.

References QColorSpace::Custom, QColorVector::isValid(), parseXyzData(), qCWarning, qFuzzyCompare(), QColorVector::x, QColorVector::y, and QColorVector::z.

Referenced by fromIccProfile().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parseLutData()

template<typename T >
static bool QIcc::parseLutData ( const QByteArray & data,
const TagEntry & tagEntry,
QColorSpacePrivate * colorSpacePrivate,
bool isAb )
static

Definition at line 711 of file qicc.cpp.

References QColorSpace::Cmyk, fromFixedS1516(), intPow(), j, QColorTransferTable::OneWay, output, parseCLUT(), Q_ASSERT, qCWarning, QColorMatrix::r, and QColorVector::x.

+ Here is the call graph for this function:

◆ parseMabData()

static bool QIcc::parseMabData ( const QByteArray & data,
const TagEntry & tagEntry,
QColorSpacePrivate * colorSpacePrivate,
bool isAb )
static

Definition at line 855 of file qicc.cpp.

References QColorSpace::Cmyk, fromFixedS1516(), i, QColorTransferTable::OneWay, parseCLUT(), parseTRC(), and qCWarning.

Referenced by parseA2B().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parseRgbMatrix()

static bool QIcc::parseRgbMatrix ( const QByteArray & data,
const QHash< Tag, TagEntry > & tagIndex,
QColorSpacePrivate * colorspaceDPtr )
static

Definition at line 1111 of file qicc.cpp.

References QColorSpace::AdobeRgb, QColorSpace::Custom, QColorSpace::DciP3D65, parseXyzData(), QColorSpace::ProPhotoRgb, qCDebug, qCWarning, QColorSpace::SRgb, QColorMatrix::toXyzFromAdobeRgb(), QColorMatrix::toXyzFromDciP3D65(), QColorMatrix::toXyzFromProPhotoRgb(), and QColorMatrix::toXyzFromSRgb().

Referenced by fromIccProfile().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parseTRC()

static quint32 QIcc::parseTRC ( const QByteArrayView & tagData,
QColorTrc & gamma,
QColorTransferTable::Type type = QColorTransferTable::TwoWay )
static

Definition at line 560 of file qicc.cpp.

References curv, d, fromFixedS1516(), QColorTransferFunction::fromGamma(), Qt::hex(), QColorTrc::m_fun, QColorTrc::m_table, QColorTrc::m_type, para, Q_STATIC_ASSERT, qCDebug, and qCWarning.

Referenced by parseMabData(), and parseTRCs().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parseTRCs()

static bool QIcc::parseTRCs ( const QByteArray & data,
const QHash< Tag, TagEntry > & tagIndex,
QColorSpacePrivate * colorspaceDPtr,
bool isColorSpaceTypeGray )
static

Definition at line 1187 of file qicc.cpp.

References QColorSpace::Custom, QColorTransferFunction::fromGamma(), QColorTransferFunction::fromSRgb(), QColorSpace::Gamma, QColorSpace::Linear, parseTRC(), qCDebug, qCWarning, QColorSpace::SRgb, and QColorTransferTable::TwoWay.

Referenced by fromIccProfile().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parseXyzData()

static bool QIcc::parseXyzData ( const QByteArray & data,
const TagEntry & tagEntry,
QColorVector & colorVector )
static

Definition at line 541 of file qicc.cpp.

References fromFixedS1516(), and qCWarning.

Referenced by fromIccProfile(), parseGrayMatrix(), and parseRgbMatrix().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toFixedS1516()

static int QIcc::toFixedS1516 ( float x)
static

Definition at line 265 of file qicc.cpp.

Referenced by toIccProfile(), and writeColorTrc().

+ Here is the caller graph for this function:

◆ toIccProfile()

QByteArray QIcc::toIccProfile ( const QColorSpace & space)

Definition at line 371 of file qicc.cpp.

References ch, chad, QColorMatrix::chromaticAdaptation(), QByteArray::constData(), QColorVector::D50(), QByteArray::data(), QColorSpace::description(), Display, QColorSpacePrivate::get(), IccTag(), QColorSpace::isValid(), isValidIccProfile(), QBuffer::open(), Q_ASSERT, QByteArray(), QByteArray::size(), QString::size(), toFixedS1516(), writeColorTrc(), and QIODeviceBase::WriteOnly.

Referenced by QColorSpace::iccProfile().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ writeColorTrc()

static int QIcc::writeColorTrc ( QDataStream & stream,
const QColorTrc & trc )
static

Definition at line 322 of file qicc.cpp.

References fun, i, QList< T >::isEmpty(), QColorTrc::isIdentity(), QColorTrc::m_fun, QColorTrc::m_table, QColorTransferTable::m_table16, QColorTransferTable::m_table8, QColorTransferTable::m_tableSize, QColorTrc::m_type, Q_ASSERT, qFuzzyIsNull(), and toFixedS1516().

Referenced by toIccProfile().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: