automated commit by check50 [check50=True]

This commit is contained in:
kukemuna 2024-03-08 13:23:14 +02:00
parent 9d3154c320
commit dcd83c0cd7
1 changed files with 1 additions and 1 deletions

View File

@ -8,7 +8,7 @@ void grayscale(int height, int width, RGBTRIPLE image[height][width])
{
for (int j = 0; j < width; j++)
{
int avg = round((image[i][j].rgbtBlue + image[i][j].rgbtGreen + image[i][j].rgbtRed) / 3);
int avg = round((image[i][j].rgbtBlue + image[i][j].rgbtGreen + image[i][j].rgbtRed) / (float) 3);
image[i][j].rgbtBlue = image[i][j].rgbtGreen = image[i][j].rgbtRed = avg;
}
}