12#include <klocalizedstring.h>
29 addStandardCompositeOps<KoGrayU8Traits>(
this);
30 addStandardDitherOps<KoGrayU8Traits>(
this);
41 QDomElement labElt = doc.createElement(
"Gray");
44 colorElt.appendChild(labElt);
56 *luma = channelValues[0];
61 QVector <double> channelValues(2);
62 channelValues.fill(*luma);
69 *y = channelValues[0];
74 QVector <double> channelValues(2);
75 channelValues.fill(*y);
GrayAU8ColorSpace(const QString &name, KoColorProfile *p)
void toHSY(const QVector< double > &channelValues, qreal *hue, qreal *sat, qreal *luma) const override
void colorToXML(const quint8 *pixel, QDomDocument &doc, QDomElement &colorElt) const override
QVector< double > fromHSY(qreal *hue, qreal *sat, qreal *luma) 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
QVector< double > fromYUV(qreal *y, qreal *u, qreal *v) const override
@ ALPHA
The channel represents the opacity of a pixel.
@ COLOR
The channel represents a color.
@ UINT8
use this for an unsigned integer 8bits 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