changeset 216:47d52db10369

fix
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 22 Mar 2019 10:34:11 +0100
parents c2d729329fc7
children 449c816968b9
files Plugin/DecodedImageAdapter.cpp
diffstat 1 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/Plugin/DecodedImageAdapter.cpp	Wed Feb 27 17:25:07 2019 +0100
+++ b/Plugin/DecodedImageAdapter.cpp	Fri Mar 22 10:34:11 2019 +0100
@@ -28,7 +28,6 @@
 #include <Core/OrthancException.h>
 #include <Core/Toolbox.h>
 #include <Plugins/Samples/GdcmDecoder/OrthancImageWrapper.h>
-#include <Resources/ThirdParty/base64/base64.h>
 
 #include <boost/lexical_cast.hpp>
 #include <boost/algorithm/string/predicate.hpp>
@@ -363,8 +362,10 @@
 
     std::string z;
     CompressUsingDeflate(z, image.GetContext(), converted.GetConstBuffer(), converted.GetSize());
-
-    result["Orthanc"]["PixelData"] = base64_encode(z);  
+    
+    std::string s;
+    Orthanc::Toolbox::EncodeBase64(s, z);
+    result["Orthanc"]["PixelData"] = s;
 
     return true;
   }
@@ -484,7 +485,10 @@
     std::string jpeg;
     WriteJpegToMemory(jpeg, image.GetContext(), converted, quality);
 
-    result["Orthanc"]["PixelData"] = base64_encode(jpeg);  
+    std::string s;
+    Orthanc::Toolbox::EncodeBase64(s, jpeg);
+    result["Orthanc"]["PixelData"] = s;
+    
     return true;
   }
 }