48 {
51
53 "Source width must be double the destination width");
55 "Source height must be double the destination height");
56
57 for (fl::u16
y = 0;
y < dstHeight; ++
y) {
58 for (fl::u16
x = 0;
x < dstWidth; ++
x) {
59
62
63
68
69
70 fl::u16 r =
71 (p00.r + p10.r + p01.r + p11.r + 2) / 4;
72 fl::u16 g = (p00.g + p10.g + p01.g + p11.g + 2) / 4;
73 fl::u16 b = (p00.b + p10.b + p01.b + p11.b + 2) / 4;
74
75
78 }
79 }
80}
u16 mapToIndex(const u16 &x, const u16 &y) const
Representation of an RGB pixel (Red, Green, Blue)