comparison OrthancFramework/Sources/Images/PngReader.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
comparison
equal deleted inserted replaced
5053:1e435be86887 5054:255b02c68908
173 else if (color_type == PNG_COLOR_TYPE_RGBA && bit_depth == 8) 173 else if (color_type == PNG_COLOR_TYPE_RGBA && bit_depth == 8)
174 { 174 {
175 format = PixelFormat_RGBA32; 175 format = PixelFormat_RGBA32;
176 pitch = 4 * width; 176 pitch = 4 * width;
177 } 177 }
178 else if (color_type == PNG_COLOR_TYPE_RGBA && bit_depth == 16)
179 {
180 format = PixelFormat_RGBA64;
181 pitch = 8 * width;
182
183 if (Toolbox::DetectEndianness() == Endianness_Little)
184 {
185 png_set_swap(rabi.png_);
186 }
187 }
178 else 188 else
179 { 189 {
180 throw OrthancException(ErrorCode_NotImplemented); 190 throw OrthancException(ErrorCode_NotImplemented);
181 } 191 }
182 192