- dst_data[0] = r1 * dy1 + r2 * dy;
- dst_data[1] = g1 * dy1 + g2 * dy;
- dst_data[2] = b1 * dy1 + b2 * dy;
+ dst_data[0] = static_cast<unsigned char>(r1 * dy1 + r2 * dy);
+ dst_data[1] = static_cast<unsigned char>(g1 * dy1 + g2 * dy);
+ dst_data[2] = static_cast<unsigned char>(b1 * dy1 + b2 * dy);