From e63633b6dab3b108b175bdfd67e5538b750c1829 Mon Sep 17 00:00:00 2001 From: RazorNeko Date: Wed, 13 Feb 2019 13:54:45 +0300 Subject: [PATCH] Add extra argument. --- utils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils.cpp b/utils.cpp index c2f5e9e..052633b 100644 --- a/utils.cpp +++ b/utils.cpp @@ -16,7 +16,7 @@ void unpack_color(const uint32_t &color, uint8_t &r, uint8_t &g, uint8_t &b, uin void drop_ppm_image(const std::string filename, const std::vector &image, const size_t w, const size_t h) { assert(image.size() == w*h); - std::ofstream ofs(filename); + std::ofstream ofs(filename, std::ios::binary); ofs << "P6\n" << w << " " << h << "\n255\n"; for (size_t i = 0; i < h*w; ++i) { uint8_t r, g, b, a;