changeset 5839:7aef730c0859

cont
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 16 Oct 2024 19:34:42 +0200
parents 4b47151dea4c
children 4d932683049d 3ddd1b0231e9 b8cf5653a418
files OrthancFramework/Sources/Images/ImageProcessing.cpp
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancFramework/Sources/Images/ImageProcessing.cpp	Wed Oct 16 18:27:31 2024 +0200
+++ b/OrthancFramework/Sources/Images/ImageProcessing.cpp	Wed Oct 16 19:34:42 2024 +0200
@@ -2888,8 +2888,7 @@
     const unsigned int width = image.GetWidth();
     const unsigned int height = image.GetHeight();
     const unsigned int pitch = image.GetPitch();
-    uint8_t* buffer = reinterpret_cast<uint8_t*>(image.GetBuffer());
-        
+
     if (image.GetFormat() != PixelFormat_RGB24 ||
         pitch < 3 * width)
     {
@@ -2898,7 +2897,7 @@
 
     for (unsigned int y = 0; y < height; y++)
     {
-      uint8_t* p = buffer + y * pitch;
+      uint8_t* p = reinterpret_cast<uint8_t*>(image.GetRow(y));
           
       for (unsigned int x = 0; x < width; x++, p += 3)
       {