comparison 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
comparison
equal deleted inserted replaced
2016:0ae26237569a 2017:08ce34cfacad
209 PixelFormat format, 209 PixelFormat format,
210 const void* buffer) 210 const void* buffer)
211 { 211 {
212 Prepare(width, height, pitch, format, buffer); 212 Prepare(width, height, pitch, format, buffer);
213 213
214 // TODO This will not work on Windows system if the path contains non-ASCII characters 214 FILE* fp = Toolbox::OpenFile(filename, FileMode_WriteBinary);
215 FILE* fp = fopen(filename.c_str(), "wb");
216 if (!fp) 215 if (!fp)
217 { 216 {
218 throw OrthancException(ErrorCode_CannotWriteFile); 217 throw OrthancException(ErrorCode_CannotWriteFile);
219 } 218 }
220 219