Mercurial > hg > orthanc-wsi
diff Framework/Orthanc/Core/Images/IImageWriter.cpp @ 54:06847108819c
sync
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 24 Nov 2016 12:59:50 +0100 |
parents | 9621fd6f17c9 |
children |
line wrap: on
line diff
--- a/Framework/Orthanc/Core/Images/IImageWriter.cpp Thu Nov 17 15:47:09 2016 +0100 +++ b/Framework/Orthanc/Core/Images/IImageWriter.cpp Thu Nov 24 12:59:50 2016 +0100 @@ -32,18 +32,13 @@ #include "IImageWriter.h" -#include "../OrthancException.h" - -#if !defined(ORTHANC_SANDBOXED) -# error The macro ORTHANC_SANDBOXED must be defined -#endif - #if ORTHANC_SANDBOXED == 0 # include "../SystemToolbox.h" #endif namespace Orthanc { +#if ORTHANC_SANDBOXED == 0 void IImageWriter::WriteToFileInternal(const std::string& path, unsigned int width, unsigned int height, @@ -51,12 +46,9 @@ PixelFormat format, const void* buffer) { -#if ORTHANC_SANDBOXED == 0 std::string compressed; WriteToMemoryInternal(compressed, width, height, pitch, format, buffer); SystemToolbox::WriteFile(compressed, path); -#else - throw OrthancException(ErrorCode_CannotWriteFile); // Unavailable in sandboxed environments + } #endif - } }