diff OrthancFramework/Sources/Images/PngWriter.cpp @ 5054:255b02c68908

Added support for RGBA64 images in tools/create-dicom and /preview (Contribution from James Manners - Pliny)
author Alain Mazy <am@osimis.io>
date Fri, 08 Jul 2022 15:26:52 +0200
parents 43e613a7756b
children 0ea402b4d901
line wrap: on
line diff
--- a/OrthancFramework/Sources/Images/PngWriter.cpp	Fri Jul 08 07:24:10 2022 +0200
+++ b/OrthancFramework/Sources/Images/PngWriter.cpp	Fri Jul 08 15:26:52 2022 +0200
@@ -165,6 +165,11 @@
           bitDepth_ = 16;
           colorType_ = PNG_COLOR_TYPE_GRAY;
           break;
+        
+        case PixelFormat_RGBA64:
+          bitDepth_ = 16;
+          colorType_ = PNG_COLOR_TYPE_RGBA;
+          break;
 
         default:
           throw OrthancException(ErrorCode_NotImplemented);
@@ -189,6 +194,7 @@
         {
           case PixelFormat_Grayscale16:
           case PixelFormat_SignedGrayscale16:
+          case PixelFormat_RGBA64:
           {
             int transforms = 0;
             if (Toolbox::DetectEndianness() == Endianness_Little)