Fix image::Bl output pgm and ppm

This commit is contained in:
Stephen Seo 2021-10-06 18:26:00 +09:00
parent e85412d61a
commit c5364f2ebc

View file

@ -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);