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:
authorCampbell Barton <ideasman42@gmail.com>2012-01-15 13:16:39 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-01-15 13:16:39 +0400
commit917714acf72340bbea363c81773887c6c532c7d8 (patch)
treef987aa296bb053949b2dbecf7931f4a73dc3a2db /source/blender/editors/space_image
parent3bb9c4adf985aff5e8e213807f3db0d7cd7556e7 (diff)
parent5c93135ef9a1e7265ead3b92b10ea9a4ef82b909 (diff)
svn merge ^/trunk/blender -r43345:43381
Diffstat (limited to 'source/blender/editors/space_image')
-rw-r--r--source/blender/editors/space_image/image_ops.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index 999a25f57b5..06674513868 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -2016,14 +2016,14 @@ static int image_sample_line_exec(bContext *C, wmOperator *op)
hist->data_r[i] = rgb[0];
hist->data_g[i] = rgb[1];
hist->data_b[i] = rgb[2];
- hist->data_luma[i] = (0.299f*rgb[0] + 0.587f*rgb[1] + 0.114f*rgb[2]);
+ hist->data_luma[i] = rgb_to_luma(rgb);
}
else if (ibuf->rect) {
cp= (unsigned char *)(ibuf->rect + y*ibuf->x + x);
hist->data_r[i] = (float)cp[0]/255.0f;
hist->data_g[i] = (float)cp[1]/255.0f;
hist->data_b[i] = (float)cp[2]/255.0f;
- hist->data_luma[i] = (0.299f*cp[0] + 0.587f*cp[1] + 0.114f*cp[2])/255;
+ hist->data_luma[i] = (float)rgb_to_luma_byte(cp)/255.0f;
}
}
}