diff options
Diffstat (limited to 'src/ppm.c')
-rw-r--r-- | src/ppm.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |