12#include <klocalizedstring.h>
29 addStandardCompositeOps<KoYCbCrU16Traits>(
this);
30 addStandardDitherOps<KoYCbCrU16Traits>(
this);
49 const KoYCbCrU16Traits::Pixel *
p =
reinterpret_cast<const KoYCbCrU16Traits::Pixel *
>(pixel);
50 QDomElement labElt = doc.createElement(
"YCbCr");
55 colorElt.appendChild(labElt);
60 KoYCbCrU16Traits::Pixel *
p =
reinterpret_cast<KoYCbCrU16Traits::Pixel *
>(pixel);
69 LabToLCH(channelValues[0],channelValues[1],channelValues[2], luma, sat, hue);
74 QVector <double> channelValues(4);
75 LCHToLab(*luma, *sat, *hue, &channelValues[0],&channelValues[1],&channelValues[2]);
88 QVector <double> channelValues(4);
void LabToLCH(const qreal l, const qreal a, const qreal b, qreal *L, qreal *C, qreal *H)
void LCHToLab(const qreal L, const qreal C, const qreal H, qreal *l, qreal *a, qreal *b)
@ ALPHA
The channel represents the opacity of a pixel.
@ COLOR
The channel represents a color.
@ UINT16
use this for an integer 16bits channel
static _Tdst scaleToA(_T a)
virtual void addChannel(KoChannelInfo *ci)
const KoColorProfile * profile() const override
void toYUV(const QVector< double > &channelValues, qreal *y, qreal *u, qreal *v) const override
bool willDegrade(ColorSpaceIndependence independence) const override
void toHSY(const QVector< double > &channelValues, qreal *hue, qreal *sat, qreal *luma) const override
void colorFromXML(quint8 *pixel, const QDomElement &elt) const override
virtual KoColorSpace * clone() const
void colorToXML(const quint8 *pixel, QDomDocument &doc, QDomElement &colorElt) const override
YCbCrU16ColorSpace(const QString &name, KoColorProfile *p)
QVector< double > fromHSY(qreal *hue, qreal *sat, qreal *luma) const override
QVector< double > fromYUV(qreal *y, qreal *u, qreal *v) const override
double toDouble(const QString &str, bool *ok=nullptr)
QString toString(const QString &value)
static const qint32 alpha_pos
static const qint32 Y_pos
static const qint32 Cr_pos
static const qint32 Cb_pos