12#include <klocalizedstring.h>
32 addStandardCompositeOps<KoGrayF16Traits>(
this);
33 addStandardDitherOps<KoGrayF16Traits>(
this);
43 const KoGrayF16Traits::channels_type *
p =
reinterpret_cast<const KoGrayF16Traits::channels_type *
>(pixel);
44 QDomElement labElt = doc.createElement(
"Gray");
47 colorElt.appendChild(labElt);
52 KoGrayF16Traits::channels_type *
p =
reinterpret_cast<KoGrayF16Traits::channels_type *
>(pixel);
59 *luma = channelValues[0];
64 QVector <double> channelValues(2);
65 channelValues.fill(*luma);
72 *y = channelValues[0];
77 QVector <double> channelValues(2);
78 channelValues.fill(*y);
#define TYPE_GRAYA_HALF_FLT
GrayF16ColorSpace(const QString &name, KoColorProfile *p)
virtual KoColorSpace * clone() const
QVector< double > fromYUV(qreal *y, qreal *u, qreal *v) const override
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
void toYUV(const QVector< double > &channelValues, qreal *y, qreal *u, qreal *v) const override
void colorFromXML(quint8 *pixel, const QDomElement &elt) const override
QVector< double > fromHSY(qreal *hue, qreal *sat, qreal *luma) const override
@ ALPHA
The channel represents the opacity of a pixel.
@ COLOR
The channel represents a color.
@ FLOAT16
use this for a float 16bits 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)