template<typename _channel_type_, typename traits>
class KisColorFromFloat< _channel_type_, traits >
Definition at line 72 of file kis_qmic_simple_convertor.cpp.
template<typename _channel_type_ , typename traits >
| void KisColorFromFloat< _channel_type_, traits >::transform |
( |
const quint8 * | src, |
|
|
quint8 * | dst, |
|
|
qint32 | nPixels ) const |
|
inlineoverridevirtual |
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 84 of file kis_qmic_simple_convertor.cpp.
85 {
86 const auto *srcPixel =
87 reinterpret_cast<const KoRgbF32Traits::Pixel *
>(
src);
88 auto *dstPixel =
reinterpret_cast<RGBPixel *
>(dst);
89
90 const float gmicUnitValue2KritaUnitValue =
92
93 while (nPixels > 0) {
94 dstPixel->red =
97 * gmicUnitValue2KritaUnitValue);
98 dstPixel->blue =
101 * gmicUnitValue2KritaUnitValue);
102
103 --nPixels;
104 ++srcPixel;
105 ++dstPixel;
106 }
107 }
typename RGBTrait::Pixel RGBPixel
#define SCALE_FROM_FLOAT(v)
References KisColorFromFloat< _channel_type_, traits >::m_gmicUnitValue, and SCALE_FROM_FLOAT.