We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9990554 commit a857ec9Copy full SHA for a857ec9
libs/viewer/src/AutomationEngine.cpp
@@ -80,7 +80,7 @@ static void exportScreenshot(View* view, Renderer* renderer, std::string filenam
80
convertRGBAtoRGB(buffer, vp.width, vp.height);
81
82
Path out(state->filename);
83
- std::ofstream ppmStream(out);
+ std::ofstream ppmStream(out, std::ios_base::binary);
84
ppmStream << "P6 " << vp.width << " " << vp.height << " " << 255 << std::endl;
85
ppmStream.write(static_cast<char*>(buffer), vp.width * vp.height * 3);
86
delete[] static_cast<uint8_t*>(buffer);
0 commit comments