# HG changeset patch # User Sebastien Jodogne # Date 1402131088 -7200 # Node ID 5a125d587810bf6b467d35d6470c417061ecb448 # Parent a546b05a43da45553ada7d5828c2a1fe8213e5d7 test diff -r a546b05a43da -r 5a125d587810 Core/ImageFormats/ImageProcessing.cpp --- a/Core/ImageFormats/ImageProcessing.cpp Sat Jun 07 10:49:00 2014 +0200 +++ b/Core/ImageFormats/ImageProcessing.cpp Sat Jun 07 10:51:28 2014 +0200 @@ -133,7 +133,31 @@ if (target.GetFormat() == PixelFormat_Grayscale8 && source.GetFormat() == PixelFormat_Grayscale16) { + printf("ICI2\n"); ConvertInternal(target, source); + + /*for (unsigned int y = 0; y < source.GetHeight(); y++) + { + uint8_t* t = reinterpret_cast(target.GetRow(y)); + const uint16_t* s = reinterpret_cast(source.GetConstRow(y)); + + for (unsigned int x = 0; x < source.GetWidth(); x++, t++, s++) + { + if (*s < 0) + { + *t = 0; + } + else if (*s > 255) + { + *t = 255; + } + else + { + *t = static_cast(*s); + } + } + }*/ + return; }