Skip to content

Instantly share code, notes, and snippets.

View themattmcguire's full-sized avatar

themattmcguire

View GitHub Profile
#include "helpers.h"
// Convert image to grayscale
void grayscale(int height, int width, RGBTRIPLE image[height][width])
{
for (int i = 0; i < height; i++) //outer loop for rows
{
for (int j = 0; j < width; j++) //inner loop for each pixel