From c5364f2ebcab132ee187f4a4673dc4775acf4a16 Mon Sep 17 00:00:00 2001 From: Stephen Seo Date: Wed, 6 Oct 2021 18:26:00 +0900 Subject: [PATCH] Fix image::Bl output pgm and ppm --- src/image.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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);