Mercurial > hg > orthanc-wsi
comparison Resources/Orthanc/Core/Images/JpegWriter.cpp @ 116:a18bfe1fdd62
sync
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 04 Jan 2018 10:49:34 +0100 |
parents | ff0ef01c332c |
children |
comparison
equal
deleted
inserted
replaced
115:a51dee6a1515 | 116:a18bfe1fdd62 |
---|---|
1 /** | 1 /** |
2 * Orthanc - A Lightweight, RESTful DICOM Store | 2 * Orthanc - A Lightweight, RESTful DICOM Store |
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics | 3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
4 * Department, University Hospital of Liege, Belgium | 4 * Department, University Hospital of Liege, Belgium |
5 * Copyright (C) 2017 Osimis, Belgium | 5 * Copyright (C) 2017-2018 Osimis S.A., Belgium |
6 * | 6 * |
7 * This program is free software: you can redistribute it and/or | 7 * This program is free software: you can redistribute it and/or |
8 * modify it under the terms of the GNU General Public License as | 8 * modify it under the terms of the GNU General Public License as |
9 * published by the Free Software Foundation, either version 3 of the | 9 * published by the Free Software Foundation, either version 3 of the |
10 * License, or (at your option) any later version. | 10 * License, or (at your option) any later version. |
160 fclose(fp); | 160 fclose(fp); |
161 } | 161 } |
162 #endif | 162 #endif |
163 | 163 |
164 | 164 |
165 #if ORTHANC_SANDBOXED == 0 | |
165 void JpegWriter::WriteToMemoryInternal(std::string& jpeg, | 166 void JpegWriter::WriteToMemoryInternal(std::string& jpeg, |
166 unsigned int width, | 167 unsigned int width, |
167 unsigned int height, | 168 unsigned int height, |
168 unsigned int pitch, | 169 unsigned int pitch, |
169 PixelFormat format, | 170 PixelFormat format, |
204 // Everything went fine, "setjmp()" didn't get called | 205 // Everything went fine, "setjmp()" didn't get called |
205 | 206 |
206 jpeg.assign(reinterpret_cast<const char*>(data), size); | 207 jpeg.assign(reinterpret_cast<const char*>(data), size); |
207 free(data); | 208 free(data); |
208 } | 209 } |
210 #endif | |
209 } | 211 } |