diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-03-18 15:34:05 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-03-18 15:34:05 +0400 |
commit | b19155e76cca879724f7deae2cfd71d19f953229 (patch) | |
tree | fd9f377b847c3e299617ab6ed28609653e5cd72d /source/blender/imbuf/intern/colormanagement.c | |
parent | 4c1d80bf86d112deef528d3737230452e3616839 (diff) |
Fix #34672: Image sampling line didn't use color management for byte buffers
This makes it so sample line (for all image editor, sequencer and compositor)
displaying managed color for byte buffers as well. It was simply not implemented
before.
Diffstat (limited to 'source/blender/imbuf/intern/colormanagement.c')
-rw-r--r-- | source/blender/imbuf/intern/colormanagement.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/source/blender/imbuf/intern/colormanagement.c b/source/blender/imbuf/intern/colormanagement.c index 505ba2599df..aa3dd05dbd1 100644 --- a/source/blender/imbuf/intern/colormanagement.c +++ b/source/blender/imbuf/intern/colormanagement.c @@ -1583,6 +1583,26 @@ void IMB_colormanagement_scene_linear_to_colorspace_v3(float pixel[3], ColorSpac OCIO_processorApplyRGB(processor, pixel); } +void IMB_colormanagement_colorspace_to_scene_linear_v4(float pixel[4], int predivide, ColorSpace *colorspace) +{ + OCIO_ConstProcessorRcPtr *processor; + + if (!colorspace) { + /* should never happen */ + printf("%s: perform conversion from unknown color space\n", __func__); + return; + } + + processor = colorspace_to_scene_linear_processor(colorspace); + + if (processor) { + if (predivide) + OCIO_processorApplyRGBA_predivide(processor, pixel); + else + OCIO_processorApplyRGBA(processor, pixel); + } +} + void IMB_colormanagement_colorspace_to_scene_linear(float *buffer, int width, int height, int channels, struct ColorSpace *colorspace, int predivide) { OCIO_ConstProcessorRcPtr *processor; |