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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-10-12 17:42:34 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-12-13 21:25:46 +0300
commitf527ce5b2f5bb300a7fe55db33d1e3a4da8051c7 (patch)
treedf1226d253b2a7c2e66cba75b37f9ec0a475c288 /source/blender/imbuf/intern/colormanagement_inline.c
parent6601a89650f92454aa57bc01bedebd4086f6d98d (diff)
Color management: add OCIO aware utility functions for transform to/from XYZ.
Diffstat (limited to 'source/blender/imbuf/intern/colormanagement_inline.c')
-rw-r--r--source/blender/imbuf/intern/colormanagement_inline.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/imbuf/intern/colormanagement_inline.c b/source/blender/imbuf/intern/colormanagement_inline.c
index 4a55f8f86ae..37ef8779f58 100644
--- a/source/blender/imbuf/intern/colormanagement_inline.c
+++ b/source/blender/imbuf/intern/colormanagement_inline.c
@@ -62,4 +62,14 @@ unsigned char IMB_colormanagement_get_luminance_byte(const unsigned char rgb[3])
return unit_float_to_uchar_clamp(val);
}
+void IMB_colormangement_xyz_to_rgb(float rgb[3], const float xyz[3])
+{
+ mul_v3_m3v3(rgb, imbuf_xyz_to_rgb, xyz);
+}
+
+void IMB_colormangement_rgb_to_xyz(float xyz[3], const float rgb[3])
+{
+ mul_v3_m3v3(xyz, imbuf_rgb_to_xyz, rgb);
+}
+
#endif /* __IMB_COLORMANAGEMENT_INLINE_H__ */