changeset 862:5a125d587810 jpeg

test
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sat, 07 Jun 2014 10:51:28 +0200
parents a546b05a43da
children 3c0d0836f704
files Core/ImageFormats/ImageProcessing.cpp
diffstat 1 files changed, 24 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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<uint8_t, uint16_t>(target, source);
+
+      /*for (unsigned int y = 0; y < source.GetHeight(); y++)
+      {
+        uint8_t* t = reinterpret_cast<uint8_t*>(target.GetRow(y));
+        const uint16_t* s = reinterpret_cast<const uint16_t*>(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<uint8_t>(*s);
+          }
+        }
+        }*/
+        
       return;
     }