Blender V4.5
colormanagement_inline.h File Reference

Go to the source code of this file.

Functions

void IMB_colormanagement_get_luminance_coefficients (float r_rgb[3])
float IMB_colormanagement_get_luminance (const float rgb[3])
uchar IMB_colormanagement_get_luminance_byte (const uchar rgb[3])
void IMB_colormanagement_xyz_to_scene_linear (float scene_linear[3], const float xyz[3])
void IMB_colormanagement_scene_linear_to_xyz (float xyz[3], const float scene_linear[3])
void IMB_colormanagement_rec709_to_scene_linear (float scene_linear[3], const float rec709[3])
void IMB_colormanagement_scene_linear_to_rec709 (float rec709[3], const float scene_linear[3])
void IMB_colormanagement_scene_linear_to_srgb_v3 (float srgb[3], const float scene_linear[3])
void IMB_colormanagement_srgb_to_scene_linear_v3 (float scene_linear[3], const float srgb[3])
void IMB_colormanagement_aces_to_scene_linear (float scene_linear[3], const float aces[3])
void IMB_colormanagement_scene_linear_to_aces (float aces[3], const float scene_linear[3])

Function Documentation

◆ IMB_colormanagement_aces_to_scene_linear()

void IMB_colormanagement_aces_to_scene_linear ( float scene_linear[3],
const float aces[3] )

Definition at line 70 of file colormanagement_inline.h.

References imbuf_aces_to_scene_linear, and mul_v3_m3v3().

Referenced by Color_from_aces_to_scene_linear().

◆ IMB_colormanagement_get_luminance()

float IMB_colormanagement_get_luminance ( const float rgb[3])

Convert a float RGB triplet to the correct luminance weighted average.

Gray-scale, or Luma is a distillation of RGB data values down to a weighted average based on the luminance positions of the red, green, and blue primaries. Given that the internal reference space may be arbitrarily set, any effort to glean the luminance coefficients must be aware of the reference space primaries.

See http://wiki.blender.org/index.php/User:Nazg-gul/ColorManagement#Luminance

Definition at line 22 of file colormanagement_inline.h.

References dot_v3v3(), and imbuf_luma_coefficients.

Referenced by BKE_histogram_update_sample_line(), blender::bke::color_to_bool(), blender::bke::color_to_float(), blender::bke::color_to_int(), do_projectpaint_soften(), do_projectpaint_soften_f(), blender::color::get_luminance(), blender::nodes::node_fn_compare_cc::get_multi_function(), image_exr_from_rgb_to_bw(), IMB_color_to_bw(), paint_2d_lift_soften(), RE_texture_evaluate(), rgbtobw_valuefn(), scopes_update_cb(), blender::seq::tonemap_calc_chunk_luminance(), blender::seq::tonemap_rd_photoreceptor(), and ui_draw_but_CURVE().

◆ IMB_colormanagement_get_luminance_byte()

uchar IMB_colormanagement_get_luminance_byte ( const unsigned char rgb[3])

◆ IMB_colormanagement_get_luminance_coefficients()

void IMB_colormanagement_get_luminance_coefficients ( float r_rgb[3])

Definition at line 17 of file colormanagement_inline.h.

References copy_v3_v3(), and imbuf_luma_coefficients.

Referenced by blender::nodes::node_composite_tonemap_cc::ToneMapOperation::compute_average_log_luminance(), blender::nodes::node_composite_tonemap_cc::ToneMapOperation::compute_average_luminance(), blender::nodes::node_composite_tonemap_cc::ToneMapOperation::compute_log_maximum_luminance(), blender::nodes::node_composite_tonemap_cc::ToneMapOperation::compute_log_minimum_luminance(), blender::nodes::node_composite_levels_cc::LevelsOperation::compute_sum(), blender::nodes::node_composite_levels_cc::LevelsOperation::compute_sum_squared_difference(), blender::compositor::ConversionOperation::execute(), blender::nodes::node_composite_tonemap_cc::ToneMapOperation::execute_photoreceptor_cpu(), blender::nodes::node_composite_tonemap_cc::ToneMapOperation::execute_photoreceptor_gpu(), blender::nodes::node_composite_levels_cc::LevelsOperation::execute_single_value(), blender::compositor::get_luminance_coefficients(), blender::nodes::node_shader_rgb_to_bw_cc::gpu_shader_rgbtobw(), blender::imbuf::imb_oiio_write(), blender::ed::vse::make_waveform_view_from_ibuf(), blender::nodes::node_composite_colorcorrection_cc::node_build_multi_function(), blender::nodes::node_composite_luma_matte_cc::node_build_multi_function(), blender::nodes::node_composite_rgb_to_bw_cc::node_build_multi_function(), blender::nodes::node_composite_colorcorrection_cc::node_gpu_material(), blender::nodes::node_composite_luma_matte_cc::node_gpu_material(), and blender::nodes::node_composite_rgb_to_bw_cc::node_gpu_material().

◆ IMB_colormanagement_rec709_to_scene_linear()

void IMB_colormanagement_rec709_to_scene_linear ( float scene_linear[3],
const float rec709[3] )

◆ IMB_colormanagement_scene_linear_to_aces()

void IMB_colormanagement_scene_linear_to_aces ( float aces[3],
const float scene_linear[3] )

Definition at line 75 of file colormanagement_inline.h.

References imbuf_scene_linear_to_aces, and mul_v3_m3v3().

Referenced by Color_from_scene_linear_to_aces().

◆ IMB_colormanagement_scene_linear_to_rec709()

void IMB_colormanagement_scene_linear_to_rec709 ( float rec709[3],
const float scene_linear[3] )

◆ IMB_colormanagement_scene_linear_to_srgb_v3()

void IMB_colormanagement_scene_linear_to_srgb_v3 ( float srgb[3],
const float scene_linear[3] )

Conversion between sRGB, for rare cases like hex color or copy/pasting between UI theme and scene linear colors.

Definition at line 58 of file colormanagement_inline.h.

References imbuf_scene_linear_to_rec709, linearrgb_to_srgb_v3_v3(), and mul_v3_m3v3().

Referenced by Color_from_scene_linear_to_srgb(), drop_color_invoke(), paint_brush_color_get(), blender::ed::sculpt_paint::sample_color_invoke(), ui_block_colorpicker(), ui_do_but_COLOR(), and ui_update_color_picker_buts_rgba().

◆ IMB_colormanagement_scene_linear_to_xyz()

void IMB_colormanagement_scene_linear_to_xyz ( float xyz[3],
const float scene_linear[3] )

◆ IMB_colormanagement_srgb_to_scene_linear_v3()

◆ IMB_colormanagement_xyz_to_scene_linear()

void IMB_colormanagement_xyz_to_scene_linear ( float scene_linear[3],
const float xyz[3] )

Conversion between scene linear and other color spaces.

Definition at line 38 of file colormanagement_inline.h.

References imbuf_xyz_to_scene_linear, and mul_v3_m3v3().

Referenced by Color_from_xyz_d65_to_scene_linear(), IMB_colormanagement_get_whitepoint(), and IMB_colormanagement_wavelength_to_rgb().