12#include <klocalizedstring.h>
26 LcmsColorSpace<KoRgbF16Traits>(colorSpaceId(), name, TYPE_RGBA_HALF_FLT, cmsSigRgbData,
p)
35 addStandardCompositeOps<KoRgbF16Traits>(
this);
36 addStandardDitherOps<KoRgbF16Traits>(
this);
59 const KoRgbF16Traits::Pixel *
p =
reinterpret_cast<const KoRgbF16Traits::Pixel *
>(pixel);
60 QDomElement labElt = doc.createElement(
"RGB");
65 colorElt.appendChild(labElt);
70 KoRgbF16Traits::Pixel *
p =
reinterpret_cast<KoRgbF16Traits::Pixel *
>(pixel);
84 QVector <double> channelValues(4);
99 QVector <double> channelValues(4);
102 channelValues[3]=1.0;
103 return channelValues;
108 fillGrayBrushWithColorPreserveLightnessRGB<KoRgbF16Traits>(dst, brush, brushColor, 1.0, nPixels);
113 fillGrayBrushWithColorPreserveLightnessRGB<KoRgbF16Traits>(dst, brush, brushColor, strength, nPixels);
118 modulateLightnessByGrayBrushRGB<KoRgbF16Traits>(dst, brush, strength, nPixels);
132 }
else if (profile->
name() ==
"High Dynamic Range UHDTV Wide Color Gamut Display (Rec. 2020) - SMPTE ST 2084 PQ EOTF") {
void HSYToRGB(const qreal h, const qreal s, const qreal y, qreal *red, qreal *green, qreal *blue, qreal R, qreal G, qreal B)
void RGBToYUV(const qreal r, const qreal g, const qreal b, qreal *y, qreal *u, qreal *v, qreal R, qreal G, qreal B)
void RGBToHSY(const qreal r, const qreal g, const qreal b, qreal *h, qreal *s, qreal *y, qreal R, qreal G, qreal B)
void YUVToRGB(const qreal y, const qreal u, const qreal v, qreal *r, qreal *g, qreal *b, qreal R, qreal G, qreal B)
@ 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 addCompositeOp(const KoCompositeOp *op)
QVector< qreal > lumaCoefficients
virtual void addChannel(KoChannelInfo *ci)
const KoColorProfile * profile() const override
QList< KoColorConversionTransformationFactory * > colorConversionLinks() const override
QList< KoColorConversionTransformationFactory * > colorConversionLinksFromProfile(const KoColorProfile *profile) const override
colorConversionLinksFromProfile Sometimes, we need to generate special color conversion links based o...
void fillGrayBrushWithColorAndLightnessWithStrength(quint8 *dst, const QRgb *brush, quint8 *brushColor, qreal strength, qint32 nPixels) const override
void modulateLightnessByGrayBrush(quint8 *dst, const QRgb *brush, qreal strength, qint32 nPixels) const override
void toYUV(const QVector< double > &channelValues, qreal *y, qreal *u, qreal *v) const override
void colorToXML(const quint8 *pixel, QDomDocument &doc, QDomElement &colorElt) 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
bool willDegrade(ColorSpaceIndependence independence) const override
void fillGrayBrushWithColorAndLightnessOverlay(quint8 *dst, const QRgb *brush, quint8 *brushColor, qint32 nPixels) const override
virtual KoColorSpace * clone() const
RgbF16ColorSpace(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)
The KoColorProfileQuery struct.
virtual ColorPrimaries getColorPrimaries() const
getColorPrimaries
virtual TransferCharacteristics getTransferCharacteristics() const
getTransferCharacteristics This function should be subclassed at some point so we can get the value f...
static KoColorSpaceRegistry * instance()
const KoColorProfile * profileFor(const KoColorProfileQuery &query, const bool generate=true) const
profileFor tries to find the profile that matches these characteristics, if no such profile is found,...
const KoColorProfile * p2020G10Profile() const