changeset 172:11413cc2b9d6

importing grayscale tiff
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 02 Aug 2019 17:42:09 +0200
parents 1390d5c87603
children 030c3729ff0c
files Framework/Inputs/HierarchicalTiff.cpp
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Framework/Inputs/HierarchicalTiff.cpp	Fri Aug 02 16:03:15 2019 +0200
+++ b/Framework/Inputs/HierarchicalTiff.cpp	Fri Aug 02 17:42:09 2019 +0200
@@ -160,6 +160,13 @@
           return false;
       }
     }
+    else if (compression == ImageCompression_Jpeg &&
+             channels == 1 &&     // This is a grayscale image
+             bpp == 8)
+    {
+      pixelFormat = Orthanc::PixelFormat_Grayscale8;
+      photometric = Orthanc::PhotometricInterpretation_Monochrome2;
+    }
     else
     {
       return false;