aboutsummaryrefslogtreecommitdiff
path: root/src/ppm.c
diff options
context:
space:
mode:
authorjvech <jmvalenciae@unal.edu.co>2023-06-19 07:46:11 -0500
committerjvech <jmvalenciae@unal.edu.co>2023-06-19 07:46:11 -0500
commitfd82f4c6257db8bc3753d28c092a62134cd6f629 (patch)
tree255a552abac854e8b2c3264902507c5659596ba0 /src/ppm.c
parent3113ade53d0dd889058c7838bb19c0fa0492b410 (diff)
add: convoution and kernel op implemented
Diffstat (limited to 'src/ppm.c')
-rw-r--r--src/ppm.c2
1 files changed, 1 insertions, 1 deletions
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);
Feel free to download, copy and edit any repo