changeset 5289:b466ca3d17bb

fix compatibility of NumpyWriter with wasm
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 04 May 2023 16:35:28 +0200
parents dc8fe64a452f
children 0035d4318594
files OrthancFramework/Sources/Images/NumpyWriter.cpp
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancFramework/Sources/Images/NumpyWriter.cpp	Wed May 03 15:48:11 2023 +0200
+++ b/OrthancFramework/Sources/Images/NumpyWriter.cpp	Thu May 04 16:35:28 2023 +0200
@@ -154,7 +154,7 @@
   {
     if (compress)
     {
-#if ORTHANC_ENABLE_ZLIB == 1
+#if (ORTHANC_ENABLE_ZLIB == 1) && (ORTHANC_SANDBOXED == 0)
       // This is the default name of the first array if arrays are
       // specified as positional arguments in "numpy.savez()"
       // https://numpy.org/doc/stable/reference/generated/numpy.savez.html
@@ -172,7 +172,7 @@
       writer.Write(uncompressed);
       writer.Close();
 #else
-      throw OrthancException(ErrorCode_InternalError, "Orthanc was compiled without support for zlib");
+      throw OrthancException(ErrorCode_InternalError, "Orthanc was compiled without support for ZIP");
 #endif
     }
     else