Mercurial > hg > orthanc
comparison Core/Images/ImageProcessing.cpp @ 2487:be1dbb1dcdd6
PixelTraits and ImageTraits
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 13 Mar 2018 16:29:20 +0100 |
parents | 509041cb57db |
children | 345725b9350c |
comparison
equal
deleted
inserted
replaced
2486:ad8f30fc28d1 | 2487:be1dbb1dcdd6 |
---|---|
613 int64_t value) | 613 int64_t value) |
614 { | 614 { |
615 switch (image.GetFormat()) | 615 switch (image.GetFormat()) |
616 { | 616 { |
617 case PixelFormat_Grayscale8: | 617 case PixelFormat_Grayscale8: |
618 SetInternal<uint8_t>(image, value); | 618 memset(image.GetBuffer(), static_cast<uint8_t>(value), image.GetPitch() * image.GetHeight()); |
619 return; | 619 return; |
620 | 620 |
621 case PixelFormat_Grayscale16: | 621 case PixelFormat_Grayscale16: |
622 SetInternal<uint16_t>(image, value); | 622 SetInternal<uint16_t>(image, value); |
623 return; | 623 return; |