From 74ee3566f0190dc7c8d8638e2f3c07cb9622e3db Mon Sep 17 00:00:00 2001 From: Jeroen Ooms Date: Sat, 4 Nov 2017 05:33:09 -0700 Subject: [PATCH] Fix for corrupted image files on Windows --- cpp/poppler-image.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/poppler-image.cpp b/cpp/poppler-image.cpp index 359298c7..4f3da1ac 100644 --- a/cpp/poppler-image.cpp +++ b/cpp/poppler-image.cpp @@ -371,7 +371,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; }