diff options
author | Xavier Thomas <xavier.thomas.1980@gmail.com> | 2010-06-06 20:26:49 +0400 |
---|---|---|
committer | Xavier Thomas <xavier.thomas.1980@gmail.com> | 2010-06-06 20:26:49 +0400 |
commit | ce9d2b8eb423708f1abde3a8897d6835873eb888 (patch) | |
tree | 98a049244f9bc02cb7c10997179f144a13bd4a50 /source/blender/editors/space_image | |
parent | 8eaa8a07631f617037b36fbab0b58dfaff95a031 (diff) |
Small fix for sample line tool. Set luma data to 0 when out of bounds.
Diffstat (limited to 'source/blender/editors/space_image')
-rw-r--r-- | source/blender/editors/space_image/image_ops.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index 33adc11caa0..fb9548001dc 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -1705,7 +1705,7 @@ static int sample_line_exec(bContext *C, wmOperator *op) y= (int)(0.5f + y1 + (float)i*(y2-y1)/255.0f); if (x<0 || y<0 || x>=ibuf->x || y>=ibuf->y) { - hist->data_r[i] = hist->data_g[i]= hist->data_b[i] = 0.0f; + hist->data_luma[i] = hist->data_r[i] = hist->data_g[i]= hist->data_b[i] = 0.0f; } else { if (ibuf->rect_float) { fp= (ibuf->rect_float + (ibuf->channels)*(y*ibuf->x + x)); |