Mercurial > hg > orthanc
comparison Core/PngWriter.cpp @ 368:80011cd589e6
support of rgb images
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 18 Feb 2013 16:07:28 +0100 |
parents | fe180eae201d |
children | bdd72233b105 |
comparison
equal
deleted
inserted
replaced
367:301f2831489c | 368:80011cd589e6 |
---|---|
132 pimpl_->rows_[y] = const_cast<uint8_t*>(reinterpret_cast<const uint8_t*>(buffer)) + y * pitch; | 132 pimpl_->rows_[y] = const_cast<uint8_t*>(reinterpret_cast<const uint8_t*>(buffer)) + y * pitch; |
133 } | 133 } |
134 | 134 |
135 switch (format) | 135 switch (format) |
136 { | 136 { |
137 case PixelFormat_RGB24: | |
138 pimpl_->bitDepth_ = 8; | |
139 pimpl_->colorType_ = PNG_COLOR_TYPE_RGB; | |
140 break; | |
141 | |
137 case PixelFormat_Grayscale8: | 142 case PixelFormat_Grayscale8: |
138 pimpl_->bitDepth_ = 8; | 143 pimpl_->bitDepth_ = 8; |
139 pimpl_->colorType_ = PNG_COLOR_TYPE_GRAY; | 144 pimpl_->colorType_ = PNG_COLOR_TYPE_GRAY; |
140 break; | 145 break; |
141 | 146 |