cpp/poppler-image.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit 155597a09b2c7fcbd0eea2b5a2021a5b65476e4c Author: Jeroen Ooms <[email protected]> Date: Sat Nov 4 05:33:09 2017 -0700 Fix for corrupted image files on Windows Bug #102494 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 <[email protected]> * Copyright (C) 2013 Adrian Johnson <[email protected]> * Copyright (C) 2017, Albert Astals Cid <[email protected]> + * Copyright (C) 2017, Jeroen Ooms <[email protected]> * * 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; } _______________________________________________ poppler mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/poppler
