# HG changeset patch # User am@osimis.io # Date 1550662462 -3600 # Node ID f58553a982049ae0d4f1ab3ed092ba94dd1a458d # Parent 345f86fd1ac3d7df8d6878f5242a977af7c522a0 fix rounding diff -r 345f86fd1ac3 -r f58553a98204 Core/Images/PixelTraits.h --- a/Core/Images/PixelTraits.h Tue Feb 19 08:43:23 2019 +0100 +++ b/Core/Images/PixelTraits.h Wed Feb 20 12:34:22 2019 +0100 @@ -103,6 +103,7 @@ static void FloatToPixel(PixelType& target, float value) { + value += 0.5f; if (value < static_cast(std::numeric_limits::min())) { target = std::numeric_limits::min();