C++ (Qt)int red = qRed(image.pixel(x, y)) / 2;int green = qQreen(image.pixel(x, y)) / 2;int blue = qBlue(image.pixel(x, y)) / 2;