# HG changeset patch # User Sebastien Jodogne # Date 1729100082 -7200 # Node ID 7aef730c0859ad1b2945884553be2cf16348d9c6 # Parent 4b47151dea4cece23be8997260e6928995dc6ec2 cont diff -r 4b47151dea4c -r 7aef730c0859 OrthancFramework/Sources/Images/ImageProcessing.cpp --- 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(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(image.GetRow(y)); for (unsigned int x = 0; x < width; x++, p += 3) {