diff Core/Images/PngWriter.cpp @ 2017:08ce34cfacad

refactoring
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 13 Jun 2016 15:49:10 +0200
parents 5bcf721bde4f
children aa4b8895cd23
line wrap: on
line diff
--- a/Core/Images/PngWriter.cpp	Mon Jun 13 15:26:20 2016 +0200
+++ b/Core/Images/PngWriter.cpp	Mon Jun 13 15:49:10 2016 +0200
@@ -211,8 +211,7 @@
   {
     Prepare(width, height, pitch, format, buffer);
 
-    // TODO This will not work on Windows system if the path contains non-ASCII characters
-    FILE* fp = fopen(filename.c_str(), "wb");
+    FILE* fp = Toolbox::OpenFile(filename, FileMode_WriteBinary);
     if (!fp)
     {
       throw OrthancException(ErrorCode_CannotWriteFile);