Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2020-05-25 12:48:31 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-05-25 12:48:31 +0300
commite76ff4df4123b5517599930629dbcf0507b582e9 (patch)
tree3cf9a67f3a3a05c678f39a04533da81f56e66c02 /source/blender/imbuf/intern/colormanagement.c
parent15dd6cb66887eb83fcc3ecf44c3b42a53161e390 (diff)
parent528f0b95c4462b2e429600a566ca0434c90310f6 (diff)
Merge branch 'master' into tmp-widget-optitmp-widget-opti
# Conflicts: # source/blender/gpu/shaders/gpu_shader_2D_widget_base_vert.glsl
Diffstat (limited to 'source/blender/imbuf/intern/colormanagement.c')
-rw-r--r--source/blender/imbuf/intern/colormanagement.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/imbuf/intern/colormanagement.c b/source/blender/imbuf/intern/colormanagement.c
index c57ab70f4e6..3f5a0f25cc5 100644
--- a/source/blender/imbuf/intern/colormanagement.c
+++ b/source/blender/imbuf/intern/colormanagement.c
@@ -1349,6 +1349,23 @@ void IMB_colormanagement_check_is_data(ImBuf *ibuf, const char *name)
}
}
+void IMB_colormanagegent_copy_settings(ImBuf *ibuf_src, ImBuf *ibuf_dst)
+{
+ IMB_colormanagement_assign_rect_colorspace(ibuf_dst,
+ IMB_colormanagement_get_rect_colorspace(ibuf_src));
+ IMB_colormanagement_assign_float_colorspace(ibuf_dst,
+ IMB_colormanagement_get_float_colorspace(ibuf_src));
+ if (ibuf_src->flags & IB_alphamode_premul) {
+ ibuf_dst->flags |= IB_alphamode_premul;
+ }
+ else if (ibuf_src->flags & IB_alphamode_channel_packed) {
+ ibuf_dst->flags |= IB_alphamode_channel_packed;
+ }
+ else if (ibuf_src->flags & IB_alphamode_ignore) {
+ ibuf_dst->flags |= IB_alphamode_ignore;
+ }
+}
+
void IMB_colormanagement_assign_float_colorspace(ImBuf *ibuf, const char *name)
{
ColorSpace *colorspace = colormanage_colorspace_get_named(name);