diff --git a/TileGenerator.cpp b/TileGenerator.cpp index 1d933d0..988a5a2 100644 --- a/TileGenerator.cpp +++ b/TileGenerator.cpp @@ -635,7 +635,7 @@ std::map TileGenerator::getBlocksOnZ(int zPos, sq void TileGenerator::writeImage(const std::string &output) { FILE *out; - out = fopen(output.c_str(), "w"); + out = fopen(output.c_str(), "wb"); gdImagePng(m_image, out); fclose(out); gdImageDestroy(m_image);