diff Framework/Layers/GrayscaleFrameRenderer.cpp @ 338:b3b3fa0e3689 am-2

BitmapStack
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 19 Oct 2018 12:50:38 +0200
parents c80b5bddf86b
children 557c8ff1db5c
line wrap: on
line diff
--- a/Framework/Layers/GrayscaleFrameRenderer.cpp	Thu Oct 18 20:07:09 2018 +0200
+++ b/Framework/Layers/GrayscaleFrameRenderer.cpp	Fri Oct 19 12:50:38 2018 +0200
@@ -27,6 +27,8 @@
 {
   CairoSurface* GrayscaleFrameRenderer::GenerateDisplay(const RenderStyle& style)
   {
+    assert(frame_->GetFormat() == Orthanc::PixelFormat_Float32);
+
     std::auto_ptr<CairoSurface> result;
 
     float windowCenter, windowWidth;
@@ -126,7 +128,7 @@
       throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange);
     }
 
-    converter.ConvertFrame(frame_);
+    converter.ConvertFrameInplace(frame_);
     assert(frame_.get() != NULL);
 
     if (frame_->GetFormat() != Orthanc::PixelFormat_Float32)