19 for (
size_t r = 0; r < source.
height() - 2; r += 2)
21 unsigned char *destRow = dest.
getRow(r);
22 unsigned char *sourceRowCurrent = source.
getRow(r);
23 unsigned char *sourceRowNext = source.
getRow(r + 1);
26 for (
size_t c = 0; c < dest.
width() - 2; c += 2)
29 destRow[0] = sourceRowNext[0];
30 destRow[1] = sourceRowCurrent[0];
31 destRow[2] = sourceRowCurrent[1];
39 destRow[0] = sourceRowNext[0];
40 destRow[1] = sourceRowCurrent[1];
41 destRow[2] = sourceRowCurrent[0];
48 destRow = dest.
getRow(r + 1);
49 sourceRowCurrent = source.
getRow(r + 1);
50 sourceRowNext = source.
getRow(r + 2);
53 for (
size_t c = 0; c < dest.
width() - 2; c += 2)
56 destRow[0] = sourceRowCurrent[0];
57 destRow[1] = sourceRowCurrent[1];
58 destRow[2] = sourceRowNext[1];;
66 destRow[0] = sourceRowCurrent[1];
67 destRow[1] = sourceRowCurrent[0];
68 destRow[2] = sourceRowNext[0];
85 for (
size_t r = 0; r < source.
height() - 2; r += 2)
87 unsigned char *destRow = dest.
getRow(r);
88 unsigned char *sourceRowCurrent = source.
getRow(r);
89 unsigned char *sourceRowNext = source.
getRow(r + 1);
92 for (
size_t c = 0; c < source.
width() - 2; c += 2)
95 destRow[0] = sourceRowCurrent[1];
96 destRow[1] = sourceRowCurrent[0];
97 destRow[2] = sourceRowNext[0];;
100 destRow += pixelSize;
105 destRow[0] = sourceRowCurrent[0];
106 destRow[1] = sourceRowCurrent[1];
107 destRow[2] = sourceRowNext[0];
109 destRow += pixelSize;
114 destRow = dest.
getRow(r + 1);
115 sourceRowCurrent = source.
getRow(r + 1);
116 sourceRowNext = source.
getRow(r + 2);
119 for (
size_t c = 0; c < dest.
width() - 2; c += 2)
122 destRow[0] = sourceRowNext[1];
123 destRow[1] = sourceRowCurrent[1];
124 destRow[2] = sourceRowCurrent[0];
127 destRow += pixelSize;
132 destRow[0] = sourceRowNext[0];
133 destRow[1] = sourceRowCurrent[0];
134 destRow[2] = sourceRowCurrent[1];
136 destRow += pixelSize;