template<class LuminanceModel>
class KisPiecewiseFilmicToneMapAdjustment< LuminanceModel >
Definition at line 115 of file kis_tonemap_adjustment.cpp.
template<class LuminanceModel >
This function apply the transformation on a given number of pixels.
- Parameters
-
| src | a pointer to the source pixels |
| dst | a pointer to the destination pixels |
| nPixels | the number of pixels |
This function may or may not be thread safe. You need to create one KoColorTransformation per thread.
Implements KoColorTransformation.
Definition at line 120 of file kis_tonemap_adjustment.cpp.
121 {
123 qWarning() << "no source space!";
124 return;
125 }
126
129
132 while (nPixels > 0) {
134
135 float Y = LuminanceModel::luminance(originalChannels.data());
137 LuminanceModel::setLuminance(originalChannels.data(), Y);
138
141
142 --nPixels;
145 }
146 }
virtual quint32 pixelSize() const =0
virtual quint32 channelCount() const =0
virtual void normalisedChannelsValue(const quint8 *pixel, QVector< float > &channels) const =0
virtual void fromNormalisedChannelsValue(quint8 *pixel, const QVector< float > &values) const =0
The piecewiseFilmicCurve class Implement's Hable's piecewise filmic curve. https://filmicworlds....
static PiecewiseFilmicCurve fromUserParams(float toeStrength=0.5, float toeLength=0.5, float shoulderStrength=2.0, float shoulderLength=0.5, float shoulderAngle=1.0)
float evalCurve(const float x)
References KoColorSpace::channelCount(), KoGamutMappingUtils::PiecewiseFilmicCurve::evalCurve(), KoColorSpace::fromNormalisedChannelsValue(), KoGamutMappingUtils::PiecewiseFilmicCurve::fromUserParams(), KisPiecewiseFilmicToneMapAdjustment< LuminanceModel >::m_shoulderAngle, KisPiecewiseFilmicToneMapAdjustment< LuminanceModel >::m_shoulderLength, KisPiecewiseFilmicToneMapAdjustment< LuminanceModel >::m_shoulderStrength, KisPiecewiseFilmicToneMapAdjustment< LuminanceModel >::m_sourceSpace, KisPiecewiseFilmicToneMapAdjustment< LuminanceModel >::m_toeLength, KisPiecewiseFilmicToneMapAdjustment< LuminanceModel >::m_toeStrength, KoColorSpace::normalisedChannelsValue(), and KoColorSpace::pixelSize().