mirror of https://github.com/me50/kukemuna.git
automated commit by check50 [check50=True]
This commit is contained in:
parent
9d3154c320
commit
dcd83c0cd7
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue