diff Plugins/Engine/OrthancPlugins.cpp @ 2107:88831c3edd8f

fix
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 19 Oct 2016 17:22:09 +0200
parents 21a8ca9ad928
children a657f7772e69
line wrap: on
line diff
--- a/Plugins/Engine/OrthancPlugins.cpp	Mon Oct 17 15:36:50 2016 +0200
+++ b/Plugins/Engine/OrthancPlugins.cpp	Wed Oct 19 17:22:09 2016 +0200
@@ -1646,7 +1646,7 @@
 
     if (image->IsReadOnly())
     {
-      std::auto_ptr<Image> copy(new Image(image->GetFormat(), image->GetWidth(), image->GetHeight()));
+      std::auto_ptr<Image> copy(new Image(image->GetFormat(), image->GetWidth(), image->GetHeight(), false));
       ImageProcessing::Copy(*copy, *image);
       image.reset(NULL);
       return reinterpret_cast<OrthancPluginImage*>(copy.release());
@@ -1885,7 +1885,7 @@
     const _OrthancPluginConvertPixelFormat& p = *reinterpret_cast<const _OrthancPluginConvertPixelFormat*>(parameters);
     const ImageAccessor& source = *reinterpret_cast<const ImageAccessor*>(p.source);
 
-    std::auto_ptr<ImageAccessor> target(new Image(Plugins::Convert(p.targetFormat), source.GetWidth(), source.GetHeight()));
+    std::auto_ptr<ImageAccessor> target(new Image(Plugins::Convert(p.targetFormat), source.GetWidth(), source.GetHeight(), false));
     ImageProcessing::Convert(*target, source);
 
     *(p.target) = ReturnImage(target);
@@ -2038,7 +2038,7 @@
     switch (service)
     {
       case _OrthancPluginService_CreateImage:
-        result.reset(new Image(Plugins::Convert(p.format), p.width, p.height));
+        result.reset(new Image(Plugins::Convert(p.format), p.width, p.height, false));
         break;
 
       case _OrthancPluginService_CreateImageAccessor: