Mercurial > hg > orthanc
diff Core/ImageFormats/PngReader.cpp @ 800:ecedd89055db
generation of DICOM images from PNG files
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 06 May 2014 16:33:40 +0200 |
parents | 777b6b694da6 |
children | a811bdf8b8eb |
line wrap: on
line diff
--- a/Core/ImageFormats/PngReader.cpp Tue May 06 12:55:41 2014 +0200 +++ b/Core/ImageFormats/PngReader.cpp Tue May 06 16:33:40 2014 +0200 @@ -171,6 +171,11 @@ format = PixelFormat_RGB24; pitch = 3 * width; } + else if (color_type == PNG_COLOR_TYPE_RGBA && bit_depth == 8) + { + format = PixelFormat_RGBA32; + pitch = 4 * width; + } else { throw OrthancException(ErrorCode_NotImplemented);