]> git.seodisparate.com - blue_noise_generation/commitdiff
Fix image::Bl output pgm and ppm
authorStephen Seo <seo.disparate@gmail.com>
Wed, 6 Oct 2021 09:26:00 +0000 (18:26 +0900)
committerStephen Seo <seo.disparate@gmail.com>
Wed, 6 Oct 2021 09:26:00 +0000 (18:26 +0900)
src/image.cpp

index fca90da0b74e2d796500e52c9b0b5580a87390a3..61e0dcc9c7503ba8838b0c7028e6b0fe5bb4ae67 100644 (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);