changeset 4664:f9eda86f9045

ImageProcessing::Convert() from Float32 to RGB24
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 14 May 2021 11:46:57 +0200
parents 72af097bb92b
children 43f13842bc3b
files OrthancFramework/Sources/Images/ImageProcessing.cpp
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancFramework/Sources/Images/ImageProcessing.cpp	Thu May 13 14:11:47 2021 +0200
+++ b/OrthancFramework/Sources/Images/ImageProcessing.cpp	Fri May 14 11:46:57 2021 +0200
@@ -1019,6 +1019,13 @@
       return;
     }
 
+    if (target.GetFormat() == PixelFormat_RGB24 &&
+        source.GetFormat() == PixelFormat_Float32)
+    {
+      ConvertFloatToGrayscale<PixelFormat_RGB24>(target, source);
+      return;
+    }
+
     throw OrthancException(ErrorCode_NotImplemented);
   }