98{
99 if (depth == 32) {
100 Q_ASSERT(sample_format == SAMPLEFORMAT_IEEEFP);
101 float *dst = reinterpret_cast<float *>(buff);
102 do {
103 const float *
d =
reinterpret_cast<const float *
>(it->
oldRawData());
104 for (uint8_t i = 0; i < nbcolorssamples; i++) {
105 *(dst++) = d[poses.at(i)];
106 }
108 *(dst++) = d[poses.at(nbcolorssamples)];
110 return true;
111 } else if (depth == 16) {
112 if (sample_format == SAMPLEFORMAT_IEEEFP) {
113#ifdef HAVE_OPENEXR
114 half *dst = reinterpret_cast<half *>(buff);
115 do {
116 const half *
d =
reinterpret_cast<const half *
>(it->
oldRawData());
117 for (uint8_t i = 0; i < nbcolorssamples; i++) {
118 *(dst++) = d[poses.at(i)];
119 }
121 *(dst++) = d[poses.at(nbcolorssamples)];
122
124 return true;
125#endif
126 } else {
127 quint16 *dst = reinterpret_cast<quint16 *>(buff);
128 do {
129 const quint16 *
d =
reinterpret_cast<const quint16 *
>(it->
oldRawData());
130 for (uint8_t i = 0; i < nbcolorssamples; i++) {
131 *(dst++) = d[poses.at(i)];
132 }
134 *(dst++) = d[poses.at(nbcolorssamples)];
135
137 return true;
138 }
139 } else if (depth == 8) {
140 quint8 *dst = reinterpret_cast<quint8 *>(buff);
141 do {
143 for (uint8_t i = 0; i < nbcolorssamples; i++) {
144 *(dst++) = d[poses.at(i)];
145 }
147 *(dst++) = d[poses.at(nbcolorssamples)];
148
150 return true;
151 }
152 return false;
153}
virtual const quint8 * oldRawData() const =0
virtual bool nextPixel()=0