diff --git a/helpers.c b/helpers.c index c95d4a0..68c4390 100644 --- a/helpers.c +++ b/helpers.c @@ -109,9 +109,9 @@ void blur(int height, int width, RGBTRIPLE image[height][width]) count++; } } - image[i][j].rgbtRed = round(sumRed / count); - image[i][j].rgbtGreen = round(sumGreen / count); - image[i][j].rgbtBlue = round(sumBlue / count); + image[i][j].rgbtRed = round(sumRed / (float) count); + image[i][j].rgbtGreen = round(sumGreen / (float) count); + image[i][j].rgbtBlue = round(sumBlue / (float) count); } } return;