summaryrefslogtreecommitdiff
path: root/src/imageutils.cc
diff options
context:
space:
mode:
authordon bright <hugh.m.bright@gmail.com>2013-01-26 21:43:06 (GMT)
committerdon bright <hugh.m.bright@gmail.com>2013-01-26 21:43:06 (GMT)
commitfc72c861859feec3f0cf365392cfc60550a4c45a (patch)
tree455a0a0958c141a35bb45e35b43664c6a23a5d18 /src/imageutils.cc
parentd4c15a8fc428b88b52eb1e5c180999725e1cfb2b (diff)
windows needs binary-mode set for exporting png
Diffstat (limited to 'src/imageutils.cc')
-rw-r--r--src/imageutils.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/imageutils.cc b/src/imageutils.cc
index eaab3b7..133eaf1 100644
--- a/src/imageutils.cc
+++ b/src/imageutils.cc
@@ -11,7 +11,7 @@ void flip_image(const unsigned char *src, unsigned char *dst, size_t pixelsize,
}
bool write_png(const char *filename, unsigned char *pixels, int width, int height) {
- std::ofstream fstream( filename );
+ std::ofstream fstream( filename, std::ios::binary );
if (fstream.is_open()) {
write_png( fstream, pixels, width, height );
fstream.close();
contact: Jan Huwald // Impressum