diff Framework/Jpeg2000Reader.cpp @ 124:24bd36849c56

Support more colorspaces with JPEG2k
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 15 Jan 2018 09:36:39 +0100
parents a51dee6a1515
children a0f9a3df1110
line wrap: on
line diff
--- a/Framework/Jpeg2000Reader.cpp	Fri Jan 05 10:15:08 2018 +0100
+++ b/Framework/Jpeg2000Reader.cpp	Mon Jan 15 09:36:39 2018 +0100
@@ -386,11 +386,11 @@
         unsigned int height = static_cast<unsigned int>(image_->y1);
 
         Orthanc::PixelFormat format;
-        if (image_->numcomps == 1 && image_->color_space != OPJ_CLRSPC_GRAY)
+        if (image_->numcomps == 1 /*&& image_->color_space != OPJ_CLRSPC_GRAY*/)
         {
           format = Orthanc::PixelFormat_Grayscale8;
         }
-        else if (image_->numcomps == 3 && image_->color_space != OPJ_CLRSPC_SRGB)
+        else if (image_->numcomps == 3 /*&& image_->color_space == OPJ_CLRSPC_SRGB*/)
         {
           format = Orthanc::PixelFormat_RGB24;
         }