13#include <klocalizedstring.h>
28 Q_ASSERT(uiRanges.size() == 1);
35 addStandardCompositeOps<KoGrayF32Traits>(
this);
36 addStandardDitherOps<KoGrayF32Traits>(
this);
47 QDomElement labElt = doc.createElement(
"Gray");
50 colorElt.appendChild(labElt);
62 *luma = channelValues[0];
67 QVector <double> channelValues(2);
68 channelValues.fill(*luma);
75 *y = channelValues[0];
80 QVector <double> channelValues(2);
81 channelValues.fill(*y);
void toHSY(const QVector< double > &channelValues, qreal *hue, qreal *sat, qreal *luma) const override
QVector< double > fromHSY(qreal *hue, qreal *sat, qreal *luma) const override
GrayF32ColorSpace(const QString &name, KoColorProfile *p)
void colorToXML(const quint8 *pixel, QDomDocument &doc, QDomElement &colorElt) const override
QVector< double > fromYUV(qreal *y, qreal *u, qreal *v) const override
void colorFromXML(quint8 *pixel, const QDomElement &elt) const override
void toYUV(const QVector< double > &channelValues, qreal *y, qreal *u, qreal *v) const override
virtual KoColorSpace * clone() const
const QVector< KoChannelInfo::DoubleRange > & getFloatUIMinMax(void) const
@ ALPHA
The channel represents the opacity of a pixel.
@ COLOR
The channel represents a color.
@ FLOAT32
use this for a float 32bits channel
static _Tdst scaleToA(_T a)
virtual void addChannel(KoChannelInfo *ci)
const KoColorProfile * profile() const override
double toDouble(const QString &str, bool *ok=nullptr)
QString toString(const QString &value)
_channels_type_ channels_type
the type of the value of the channels of this color space