diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-09-04 15:46:17 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-09-04 15:46:17 +0300 |
commit | 71f0c32dad840e4967f8e16f67eadcace16e2125 (patch) | |
tree | 5c8183a6b0642e15d63ed16f4b5169c5f4837907 /source/blender/imbuf/intern/colormanagement.c | |
parent | 885c0a5f909115377bc94bc86e7a9ceac9849346 (diff) |
Fix T52522: VSE renders with alpha transparent PNG image incorrectly
Need some extra checks and should be probably end up in 2.79 since that's a regression.
Diffstat (limited to 'source/blender/imbuf/intern/colormanagement.c')
-rw-r--r-- | source/blender/imbuf/intern/colormanagement.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/source/blender/imbuf/intern/colormanagement.c b/source/blender/imbuf/intern/colormanagement.c index 1f3be8d73bb..f510ded6b60 100644 --- a/source/blender/imbuf/intern/colormanagement.c +++ b/source/blender/imbuf/intern/colormanagement.c @@ -47,6 +47,7 @@ #include "IMB_imbuf.h" #include "IMB_imbuf_types.h" #include "IMB_filetype.h" +#include "IMB_filter.h" #include "IMB_moviecache.h" #include "MEM_guardedalloc.h" @@ -1635,12 +1636,13 @@ static void *do_processor_transform_thread(void *handle_v) if (float_from_byte) { IMB_buffer_float_from_byte(float_buffer, byte_buffer, IB_PROFILE_SRGB, IB_PROFILE_SRGB, - true, + false, width, height, width, width); - IMB_colormanagement_processor_apply(handle->cm_processor, - float_buffer, - width, height, channels, - predivide); + IMB_colormanagement_processor_apply(handle->cm_processor, + float_buffer, + width, height, channels, + predivide); + IMB_premultiply_rect_float(float_buffer, 4, width, height); } else { if (byte_buffer != NULL) { @@ -1776,14 +1778,15 @@ void IMB_colormanagement_transform_from_byte_threaded(float *float_buffer, unsig */ IMB_buffer_float_from_byte(float_buffer, byte_buffer, IB_PROFILE_SRGB, IB_PROFILE_SRGB, - true, + false, width, height, width, width); + IMB_premultiply_rect_float(float_buffer, 4, width, height); return; } cm_processor = IMB_colormanagement_colorspace_processor_new(from_colorspace, to_colorspace); processor_transform_apply_threaded(byte_buffer, float_buffer, width, height, channels, - cm_processor, true, true); + cm_processor, false, true); IMB_colormanagement_processor_free(cm_processor); } |