Mercurial > hg > orthanc
diff Core/Images/JpegWriter.cpp @ 2017:08ce34cfacad
refactoring
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 13 Jun 2016 15:49:10 +0200 |
parents | 5bcf721bde4f |
children | bfeacb51af20 |
line wrap: on
line diff
--- a/Core/Images/JpegWriter.cpp Mon Jun 13 15:26:20 2016 +0200 +++ b/Core/Images/JpegWriter.cpp Mon Jun 13 15:49:10 2016 +0200 @@ -118,11 +118,10 @@ PixelFormat format, const void* 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 == NULL) { - throw OrthancException(ErrorCode_FullStorage); + throw OrthancException(ErrorCode_CannotWriteFile); } std::vector<uint8_t*> lines;