summaryrefslogtreecommitdiff
path: root/cpp/poppler-image.cpp
diff options
context:
space:
mode:
authorJeroen Ooms <jeroenooms@gmail.com>2017-11-04 05:33:09 -0700
committerAlbert Astals Cid <aacid@kde.org>2017-11-12 00:32:02 +0100
commit155597a09b2c7fcbd0eea2b5a2021a5b65476e4c (patch)
treed8d3ebf6863e68e79e17b9fd23b8f3abca0caa0a /cpp/poppler-image.cpp
parentc45efa2d7e0db8a4ace0e8c6955b3fa48dc6d070 (diff)
Fix for corrupted image files on Windows
Bug #102494
Diffstat (limited to 'cpp/poppler-image.cpp')
-rw-r--r--cpp/poppler-image.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/cpp/poppler-image.cpp b/cpp/poppler-image.cpp
index 359298c7..de699e82 100644
--- a/cpp/poppler-image.cpp
+++ b/cpp/poppler-image.cpp
@@ -2,6 +2,7 @@
* Copyright (C) 2010-2011, Pino Toscano <pino@kde.org>
* Copyright (C) 2013 Adrian Johnson <ajohnson@redneon.com>
* Copyright (C) 2017, Albert Astals Cid <aacid@kde.org>
+ * Copyright (C) 2017, Jeroen Ooms <jeroenooms@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -371,7 +372,7 @@ bool image::save(const std::string &file_name, const std::string &out_format, in
if (!w.get()) {
return false;
}
- FILE *f = fopen(file_name.c_str(), "w");
+ FILE *f = fopen(file_name.c_str(), "wb");
if (!f) {
return false;
}