Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-10-07 12:06:19 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-10-07 12:06:19 +0400
commit51a7089bea11db9118ce6251ff0645bf5f69a184 (patch)
tree64310ea9b59ae2ee0ea097ec7dd5c6632426de6e
parentca152da25885c4760efb71657aa3f769fdf1e23d (diff)
Fix #36980: Color space issue when displaying pixel color in a render
HSV values were calculated from a linear space color, which is not so much useful and correct. Now RGB(A) buffers will use color managed color for HSV values. Still not sure which color to use for HSV when there's only one channel in a buffer. This part left unchanged for now.
-rw-r--r--source/blender/editors/space_image/image_draw.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c
index b64ece99b0f..89e57955339 100644
--- a/source/blender/editors/space_image/image_draw.c
+++ b/source/blender/editors/space_image/image_draw.c
@@ -358,14 +358,8 @@ void ED_image_draw_info(Scene *scene, ARegion *ar, int color_manage, int use_def
dx += BLF_width(blf_mono_font, str);
}
else if (channels >= 3) {
- if (fp) {
- rgb_to_hsv(fp[0], fp[1], fp[2], &hue, &sat, &val);
- rgb_to_yuv(fp[0], fp[1], fp[2], &lum, &u, &v);
- }
- else if (cp) {
- rgb_to_hsv((float)cp[0] / 255.0f, (float)cp[1] / 255.0f, (float)cp[2] / 255.0f, &hue, &sat, &val);
- rgb_to_yuv((float)cp[0] / 255.0f, (float)cp[1] / 255.0f, (float)cp[2] / 255.0f, &lum, &u, &v);
- }
+ rgb_to_hsv(finalcol[0], finalcol[1], finalcol[2], &hue, &sat, &val);
+ rgb_to_yuv(finalcol[0], finalcol[1], finalcol[2], &lum, &u, &v);
BLI_snprintf(str, sizeof(str), "H:%-.4f", hue);
BLF_position(blf_mono_font, dx, 0.3f * UI_UNIT_X, 0);