From fd82f4c6257db8bc3753d28c092a62134cd6f629 Mon Sep 17 00:00:00 2001 From: jvech Date: Mon, 19 Jun 2023 07:46:11 -0500 Subject: add: convoution and kernel op implemented --- src/ppm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ppm.c') diff --git a/src/ppm.c b/src/ppm.c index f96e950..aded7cd 100644 --- a/src/ppm.c +++ b/src/ppm.c @@ -13,7 +13,7 @@ ppm_write(const char *file, Image *img) exit(1); } - size_t n_pixels; + size_t n_pixels = img->width * img->height * 3; fprintf(fp, "P6\n%d %d\n%d\n", img->width, img->height, img->pixel_bits); fwrite(img->data, n_pixels, sizeof(uint8_t), fp); -- cgit v1.2.3-70-g09d2