template<typename _channel_type_, typename traits>
class KisColorFromGrayScaleFloat< _channel_type_, traits >
Definition at line 114 of file kis_qmic_simple_convertor.cpp.
template<typename _channel_type_ , typename traits >
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 126 of file kis_qmic_simple_convertor.cpp.
127 {
128 const auto *srcPixel =
129 reinterpret_cast<const KoRgbF32Traits::Pixel *
>(
src);
130 auto *dstPixel =
reinterpret_cast<RGBPixel *
>(dst);
131
132 const float gmicUnitValue2KritaUnitValue =
134
135
136
137 while (nPixels > 0) {
138 dstPixel->red = dstPixel->green = dstPixel->blue =
141 * gmicUnitValue2KritaUnitValue);
142
143 --nPixels;
144 ++srcPixel;
145 ++dstPixel;
146 }
147 }
typename RGBTrait::Pixel RGBPixel
#define SCALE_FROM_FLOAT(v)
References KisColorFromGrayScaleFloat< _channel_type_, traits >::m_gmicUnitValue, and SCALE_FROM_FLOAT.