Mercurial > hg > orthanc-stone
diff Resources/Orthanc/Core/Images/PngReader.cpp @ 22:b01d46e5a2b3
support for sandboxed environments
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 23 Nov 2016 12:08:15 +0100 |
parents | ff1e935768e7 |
children | 7207a407bcd8 |
line wrap: on
line diff
--- a/Resources/Orthanc/Core/Images/PngReader.cpp Tue Nov 22 15:54:06 2016 +0100 +++ b/Resources/Orthanc/Core/Images/PngReader.cpp Wed Nov 23 12:08:15 2016 +0100 @@ -34,14 +34,18 @@ #include "PngReader.h" #include "../OrthancException.h" -#include "../SystemToolbox.h" #include "../Toolbox.h" +#if ORTHANC_SANDBOXED == 0 +# include "../SystemToolbox.h" +#endif + #include <png.h> #include <string.h> // For memcpy() namespace Orthanc { +#if ORTHANC_SANDBOXED == 0 namespace { struct FileRabi @@ -66,6 +70,7 @@ } }; } +#endif struct PngReader::PngRabi @@ -207,6 +212,8 @@ AssignWritable(format, width, height, pitch, &data_[0]); } + +#if ORTHANC_SANDBOXED == 0 void PngReader::ReadFromFile(const std::string& filename) { FileRabi f(filename.c_str()); @@ -231,6 +238,7 @@ Read(rabi); } +#endif namespace