Skip to content

Commit

Permalink
Add extra argument.
Browse files Browse the repository at this point in the history
  • Loading branch information
RazorNeko authored Feb 13, 2019
1 parent 20b5d8c commit e63633b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<uint32_t> &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;
Expand Down

0 comments on commit e63633b

Please sign in to comment.