Mercurial > hg > orthanc
comparison Core/Images/PngWriter.cpp @ 2170:baf8dd89b4e0
improved support for sandboxed environments
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 23 Nov 2016 11:45:02 +0100 |
parents | fd5875662670 |
children | 35febe19e874 |
comparison
equal
deleted
inserted
replaced
2169:d15de5685ad8 | 2170:baf8dd89b4e0 |
---|---|
201 | 201 |
202 png_write_end(pimpl_->png_, NULL); | 202 png_write_end(pimpl_->png_, NULL); |
203 } | 203 } |
204 | 204 |
205 | 205 |
206 #if ORTHANC_SANDBOXED == 0 | |
206 void PngWriter::WriteToFileInternal(const std::string& filename, | 207 void PngWriter::WriteToFileInternal(const std::string& filename, |
207 unsigned int width, | 208 unsigned int width, |
208 unsigned int height, | 209 unsigned int height, |
209 unsigned int pitch, | 210 unsigned int pitch, |
210 PixelFormat format, | 211 PixelFormat format, |
228 | 229 |
229 Compress(width, height, pitch, format); | 230 Compress(width, height, pitch, format); |
230 | 231 |
231 fclose(fp); | 232 fclose(fp); |
232 } | 233 } |
233 | 234 #endif |
234 | 235 |
235 | 236 |
236 static void MemoryCallback(png_structp png_ptr, | 237 static void MemoryCallback(png_structp png_ptr, |
237 png_bytep data, | 238 png_bytep data, |
238 png_size_t size) | 239 png_size_t size) |