[Poppler-bugs] [Bug 102494] image::save() generates corrupted images on Windows

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Nov 4 12:43:35 UTC 2017


https://bugs.freedesktop.org/show_bug.cgi?id=102494

--- Comment #2 from Jeroen Ooms <jeroen at berkeley.edu> ---
I have finally found the problem. The file is opened in text mode "w" instead
of binary mode "wb". In cpp/poppler-image.cpp on line 374 it says:

  FILE *f = fopen(file_name.c_str(), "w");

This should be:

  FILE *f = fopen(file_name.c_str(), "wb");

Attached a patch.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/poppler-bugs/attachments/20171104/5f81543e/attachment.html>


More information about the Poppler-bugs mailing list