diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-09-20 14:07:49 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-09-20 14:07:49 +0400 |
commit | ddcc3f612a33de6cc1ed7ecb2b2fd66290952a31 (patch) | |
tree | c6fef0892fa237abc08627dec80995fa23878e28 /source/blender/blenkernel/intern/image.c | |
parent | be2454dc551779aaa7bf5fd39f27b65a9201bcc6 (diff) |
Fix #32603: Multi-Layer EXR files can't be color managed
Issue was caused by completely different way how multi-layer EXRs are loading,
they're bypassing general image buffer loading functions.
Solved by running color space transformation on render result construction
from multi-layer EXR image.
Also fixed issue with wrong display buffer computing for buffers with less
than 4 channels. Issues were:
- Display buffer is always expected to be RGBA
- OpenColorIO can not apply color space transformations on non-{RGB, RGBA}
pixels.
Diffstat (limited to 'source/blender/blenkernel/intern/image.c')
-rw-r--r-- | source/blender/blenkernel/intern/image.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index 7146c48cd2f..b0fdbba2aa9 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -2213,8 +2213,10 @@ void BKE_image_backup_render(Scene *scene, Image *ima) /* in that case we have to build a render-result */ static void image_create_multilayer(Image *ima, ImBuf *ibuf, int framenr) { + const char *colorspace = ima->colorspace_settings.name; + int predivide = ima->flag & IMA_CM_PREDIVIDE; - ima->rr = RE_MultilayerConvert(ibuf->userdata, ibuf->x, ibuf->y); + ima->rr = RE_MultilayerConvert(ibuf->userdata, colorspace, predivide, ibuf->x, ibuf->y); #ifdef WITH_OPENEXR IMB_exr_close(ibuf->userdata); |