From 02fa8f56798fd639b1a5760d4278089705ab34ac Mon Sep 17 00:00:00 2001 From: johan Date: Fri, 13 Sep 2013 14:03:12 +0200 Subject: [PATCH] Fix bug in hsv2rgb transform --- libsrc/utils/HsvTransform.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libsrc/utils/HsvTransform.cpp b/libsrc/utils/HsvTransform.cpp index 6595a1c7..8381da10 100644 --- a/libsrc/utils/HsvTransform.cpp +++ b/libsrc/utils/HsvTransform.cpp @@ -103,7 +103,7 @@ void HsvTransform::hsv2rgb(uint16_t hue, uint8_t saturation, uint8_t value, uint } region = hue / 60; - remainder = (hue - (region * 60)) * 6; + remainder = (hue - (region * 60)) * 256 / 60; p = (value * (255 - saturation)) >> 8; q = (value * (255 - ((saturation * remainder) >> 8))) >> 8;