From: Stephen Seo Date: Wed, 6 Oct 2021 09:26:00 +0000 (+0900) Subject: Fix image::Bl output pgm and ppm X-Git-Url: https://git.seodisparate.com/stephenseo/css/base.css?a=commitdiff_plain;h=c5364f2ebcab132ee187f4a4673dc4775acf4a16;p=blue_noise_generation Fix image::Bl output pgm and ppm --- diff --git a/src/image.cpp b/src/image.cpp index fca90da..61e0dcc 100644 --- a/src/image.cpp +++ b/src/image.cpp @@ -111,11 +111,11 @@ bool image::Bl::writeToFile(file_type type, bool canOverwrite, const char *filen break; case file_type::PGM: file = fopen(filename, "wb"); - fprintf(file, "P5\n%d %d\n255", width, height); + fprintf(file, "P5\n%d %d\n255\n", width, height); break; case file_type::PPM: file = fopen(filename, "wb"); - fprintf(file, "P6\n%d %d\n255", width, height); + fprintf(file, "P6\n%d %d\n255\n", width, height); break; default: fclose(file);