diff options
Diffstat (limited to 'source/blender/editors/space_sequencer/sequencer_view.c')
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_view.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_view.c b/source/blender/editors/space_sequencer/sequencer_view.c index 7dcd3a70870..68428cd890f 100644 --- a/source/blender/editors/space_sequencer/sequencer_view.c +++ b/source/blender/editors/space_sequencer/sequencer_view.c @@ -31,6 +31,7 @@ #include "MEM_guardedalloc.h" +#include "BLI_math.h" #include "BLI_utildefines.h" #include "DNA_scene_types.h" @@ -66,6 +67,7 @@ typedef struct ImageSampleInfo { unsigned char col[4]; float colf[4]; + float linearcol[4]; unsigned char *colp; float *colfp; @@ -81,7 +83,8 @@ static void sample_draw(const bContext *C, ARegion *ar, void *arg_info) if (info->draw) { ED_image_draw_info(scene, ar, info->color_manage, FALSE, info->channels, - info->x, info->y, info->colp, info->colfp, NULL, NULL); + info->x, info->y, info->colp, info->colfp, + info->linearcol, NULL, NULL); } } @@ -134,7 +137,10 @@ static void sample_apply(bContext *C, wmOperator *op, const wmEvent *event) info->colf[3] = (float)cp[3] / 255.0f; info->colfp = info->colf; - info->color_manage = FALSE; + copy_v4_v4(info->linearcol, info->colf); + IMB_colormanagement_colorspace_to_scene_linear_v4(info->linearcol, false, ibuf->rect_colorspace); + + info->color_manage = TRUE; } if (ibuf->rect_float) { fp = (ibuf->rect_float + (ibuf->channels) * (y * ibuf->x + x)); |