Blender V5.0
IMB_colormanagement.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2024 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
10
11#include "BLI_compiler_compat.h"
13#include "BLI_string_ref.hh"
14#include "BLI_vector.hh"
15
16#define BCM_CONFIG_FILE "config.ocio"
17
22struct ID;
23struct EnumPropertyItem;
24struct ImBuf;
25struct ImageFormatData;
26struct Main;
27struct bContext;
28
29namespace blender::ocio {
30class ColorSpace;
31class Display;
32} // namespace blender::ocio
35
37 /* Convert to display space for drawing. This will included emulation of the
38 * chosen display for an extended sRGB buffer. */
40 /* Convert to display space for file output. Note image and video have different
41 * conventions for HDR brightness, so there is a distinction. */
44 /* Convert to display space for inspecting color values as text in the UI. */
46};
47
49
50/* -------------------------------------------------------------------- */
53
55
57 ColorManagedViewSettings *view_settings);
58
61void IMB_colormanagement_check_is_data(ImBuf *ibuf, const char *name);
62void IMB_colormanagegent_copy_settings(ImBuf *ibuf_src, ImBuf *ibuf_dst);
65
66const char *IMB_colormanagement_get_float_colorspace(const ImBuf *ibuf);
67const char *IMB_colormanagement_get_rect_colorspace(const ImBuf *ibuf);
68const char *IMB_colormanagement_space_from_filepath_rules(const char *filepath);
69
71bool IMB_colormanagement_space_is_data(const ColorSpace *colorspace);
73bool IMB_colormanagement_space_is_srgb(const ColorSpace *colorspace);
77
78/* Get binary ICC profile contents for a colorspace.
79 * For describing the colorspace for standard dynamic range image files. */
81/* Get CICP code for colorspace.
82 * For describing the colorspace of videos and high dynamic range image files. */
85 const bool rgb_matrix,
86 int cicp[4]);
87const ColorSpace *IMB_colormanagement_space_from_cicp(const int cicp[4],
89
90/* Get identifier for colorspaces that works with multiple OpenColorIO configurations,
91 * as defined by the ASWF Color Interop Forum. */
94
96
108BLI_INLINE float IMB_colormanagement_get_luminance(const float rgb[3]);
112BLI_INLINE unsigned char IMB_colormanagement_get_luminance_byte(const unsigned char rgb[3]);
113
117BLI_INLINE void IMB_colormanagement_xyz_to_scene_linear(float scene_linear[3], const float xyz[3]);
118BLI_INLINE void IMB_colormanagement_scene_linear_to_xyz(float xyz[3], const float scene_linear[3]);
120 const float rec709[3]);
122 const float scene_linear[3]);
124 const float aces[3]);
126 const float scene_linear[3]);
128 const float acescg[3]);
130 const float scene_linear[3]);
132 const float rec2020[3]);
134 const float scene_linear[3]);
137
141void IMB_colormanagement_get_whitepoint(const float temperature,
142 const float tint,
143 float whitepoint[3]);
144bool IMB_colormanagement_set_whitepoint(const float whitepoint[3],
145 float &temperature,
146 float &tint);
147
149
150/* -------------------------------------------------------------------- */
153
157void IMB_colormanagement_transform_float(float *buffer,
158 int width,
159 int height,
160 int channels,
161 const char *from_colorspace,
162 const char *to_colorspace,
163 bool predivide);
167void IMB_colormanagement_transform_byte(unsigned char *buffer,
168 int width,
169 int height,
170 int channels,
171 const char *from_colorspace,
172 const char *to_colorspace);
173
177void IMB_colormanagement_transform_byte_to_float(float *float_buffer,
178 unsigned char *byte_buffer,
179 int width,
180 int height,
181 int channels,
182 const char *from_colorspace,
183 const char *to_colorspace);
184void IMB_colormanagement_transform_v4(float pixel[4],
185 const char *from_colorspace,
186 const char *to_colorspace);
187
194 const ColorSpace *colorspace);
196 bool predivide,
197 const ColorSpace *colorspace);
198
205 const ColorSpace *colorspace);
206
213 int width,
214 int height,
215 int channels,
216 const ColorSpace *colorspace,
217 bool predivide);
218
225 float *buffer, int width, int height, int channels, const ColorSpace *colorspace);
226
227void IMB_colormanagement_imbuf_to_byte_texture(unsigned char *out_buffer,
228 int offset_x,
229 int offset_y,
230 int width,
231 int height,
232 const ImBuf *ibuf,
233 bool store_premultiplied);
234void IMB_colormanagement_imbuf_to_float_texture(float *out_buffer,
235 int offset_x,
236 int offset_y,
237 int width,
238 int height,
239 const ImBuf *ibuf,
240 bool store_premultiplied);
241
252 const float scene_linear[3]);
254 const float color_picking[3]);
255
261 const float scene_linear[3]);
263 const float srgb[3]);
264
271 float pixel[3],
272 const ColorManagedDisplay *display,
273 const ColorManagedDisplaySpace display_space = DISPLAY_SPACE_DRAW);
279 float pixel[3],
280 const ColorManagedDisplay *display,
281 const ColorManagedDisplaySpace display_space = DISPLAY_SPACE_DRAW);
282
284 float result[4],
285 const float pixel[4],
286 const ColorManagedViewSettings *view_settings,
287 const ColorManagedDisplaySettings *display_settings,
288 const ColorManagedDisplaySpace display_space = DISPLAY_SPACE_DRAW);
289
291 ImBuf *ibuf,
292 const ColorManagedViewSettings *view_settings,
293 const ColorManagedDisplaySettings *display_settings,
294 const ColorManagedDisplaySpace display_space = DISPLAY_SPACE_DRAW);
295
309 bool save_as_render,
310 bool allocate_result,
311 const ImageFormatData *image_format);
312
314
315/* -------------------------------------------------------------------- */
318
320 const bContext *C,
321 ColorManagedViewSettings **r_view_settings,
322 ColorManagedDisplaySettings **r_display_settings);
323
327unsigned char *IMB_display_buffer_acquire(ImBuf *ibuf,
328 const ColorManagedViewSettings *view_settings,
329 const ColorManagedDisplaySettings *display_settings,
330 void **cache_handle);
334unsigned char *IMB_display_buffer_acquire_ctx(const bContext *C, ImBuf *ibuf, void **cache_handle);
335
336void IMB_display_buffer_transform_apply(unsigned char *display_buffer,
337 float *linear_buffer,
338 int width,
339 int height,
340 int channels,
341 const ColorManagedViewSettings *view_settings,
342 const ColorManagedDisplaySettings *display_settings,
343 bool predivide);
344
345void IMB_display_buffer_release(void *cache_handle);
346
348
349/* -------------------------------------------------------------------- */
352
362 const ColorManagedDisplay *display);
363
365 const ColorManagedViewSettings *view_settings,
366 const ColorManagedDisplaySettings *display_settings);
368 const char *view_name);
370 const char *view_name);
372 const ColorManagedDisplaySettings *display_settings, const char *view_name);
373
375
376/* -------------------------------------------------------------------- */
379
381const char *IMB_colormanagement_view_get_name_by_id(int index);
382
384
385/* -------------------------------------------------------------------- */
388
390const char *IMB_colormanagement_look_get_indexed_name(int index);
392const char *IMB_colormanagement_look_validate_for_view(const char *view_name,
393 const char *look_name);
394
396
397/* -------------------------------------------------------------------- */
400
403const char *IMB_colormanagement_colorspace_get_name(const ColorSpace *colorspace);
404const char *IMB_colormanagement_view_get_default_name(const char *display_name);
405const char *IMB_colormanagement_view_get_raw_or_default_name(const char *display_name);
406
408 ColorManagedColorspaceSettings *colorspace_settings, ImBuf *ibuf);
409
411
412/* -------------------------------------------------------------------- */
415
418
421 const bool for_undo,
422 const bool have_editable_assets);
423
427 Main *bmain,
428 const blender::float3x3 &current_scene_linear_to_xyz,
429 const blender::float3x3 &new_xyz_to_scene_linear,
430 const bool depsgraph_tag = false,
431 const bool linked_only = false,
432 const bool editable_assets_only = false);
433void IMB_colormanagement_working_space_convert(Main *bmain, const Main *reference_bmain);
434
438
440
441/* -------------------------------------------------------------------- */
444
447 int *totitem,
448 const char *display_name);
450 int *totitem,
451 const char *view_name);
453
455
456/* -------------------------------------------------------------------- */
459
461 const float *linear_buffer,
462 const unsigned char *byte_buffer,
463 int stride,
464 int offset_x,
465 int offset_y,
466 const ColorManagedViewSettings *view_settings,
467 const ColorManagedDisplaySettings *display_settings,
468 int xmin,
469 int ymin,
470 int xmax,
471 int ymax);
472
474 ImBuf *ibuf,
475 const float *linear_buffer,
476 const unsigned char *byte_buffer,
477 int stride,
478 int offset_x,
479 int offset_y,
480 const ColorManagedViewSettings *view_settings,
481 const ColorManagedDisplaySettings *display_settings,
482 int xmin,
483 int ymin,
484 int xmax,
485 int ymax);
486
488 ImBuf *ibuf, int xmin, int ymin, int xmax, int ymax);
489
491
492/* -------------------------------------------------------------------- */
495
497 const ColorManagedViewSettings *view_settings,
498 const ColorManagedDisplaySettings *display_settings,
499 const ColorManagedDisplaySpace display_space = DISPLAY_SPACE_DRAW,
500 const bool inverse = false);
501
503 const ImBuf *ibuf,
504 const ColorManagedViewSettings *view_settings,
505 const ColorManagedDisplaySettings *display_settings,
506 const ColorManagedDisplaySpace display_space = DISPLAY_SPACE_DRAW);
507
509 const ImBuf *ibuf,
510 const ColorManagedViewSettings *view_settings,
511 const ColorManagedDisplaySettings *display_settings);
512
514 const char *to_colorspace);
516void IMB_colormanagement_processor_apply_v4(ColormanageProcessor *cm_processor, float pixel[4]);
518 float pixel[4]);
519void IMB_colormanagement_processor_apply_v3(ColormanageProcessor *cm_processor, float pixel[3]);
521 float *pixel,
522 int channels);
524 float *buffer,
525 int width,
526 int height,
527 int channels,
528 bool predivide);
530 unsigned char *buffer,
531 int width,
532 int height,
533 int channels);
535
537
538/* -------------------------------------------------------------------- */
541
546 const ColorManagedDisplaySettings *display_settings,
547 float dither,
548 bool predivide);
566 const ColorManagedViewSettings *view_settings,
567 const ColorManagedDisplaySettings *display_settings,
568 const ColorSpace *from_colorspace,
569 float dither,
570 bool predivide,
571 bool do_overlay_merge);
575bool IMB_colormanagement_setup_glsl_draw_ctx(const bContext *C, float dither, bool predivide);
581 const ColorSpace *from_colorspace,
582 float dither,
583 bool predivide);
584
591bool IMB_colormanagement_setup_glsl_draw_to_scene_linear(const char *from_colorspace_name,
592 bool predivide);
593
598
600
601/* -------------------------------------------------------------------- */
604
606 ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings);
607
608/* Roles */
609enum {
618};
619
621
622/* -------------------------------------------------------------------- */
625
626void IMB_colormanagement_blackbody_temperature_to_rgb(float r_dest[4], float value);
628 int width,
629 float min,
630 float max);
631void IMB_colormanagement_wavelength_to_rgb(float r_dest[4], float value);
632void IMB_colormanagement_wavelength_to_rgb_table(float *r_table, int width);
633
635
636#include "intern/colormanagement_inline.h" // IWYU pragma: export
blender::ocio::ColorSpace ColorSpace
Definition BLF_api.hh:38
#define BLI_INLINE
#define Display
void IMB_colormanagement_pixel_to_display_space_v4(float result[4], const float pixel[4], const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings, const ColorManagedDisplaySpace display_space=DISPLAY_SPACE_DRAW)
void IMB_colormanagement_colorspace_to_scene_linear_v3(float pixel[3], const ColorSpace *colorspace)
bool IMB_colormanagement_display_support_emulation(const ColorManagedDisplaySettings *display_settings, const char *view_name)
bool IMB_colormanagement_working_space_set_from_name(const char *name)
BLI_INLINE unsigned char IMB_colormanagement_get_luminance_byte(const unsigned char rgb[3])
void IMB_colormanagement_transform_byte_to_float(float *float_buffer, unsigned char *byte_buffer, int width, int height, int channels, const char *from_colorspace, const char *to_colorspace)
void IMB_colormanagement_assign_byte_colorspace(ImBuf *ibuf, const char *name)
const char * IMB_colormanagement_get_rect_colorspace(const ImBuf *ibuf)
void IMB_colormanagement_processor_apply_byte(ColormanageProcessor *cm_processor, unsigned char *buffer, int width, int height, int channels)
void IMB_colormanagement_scene_linear_to_colorspace_v3(float pixel[3], const ColorSpace *colorspace)
void IMB_colormanagement_colorspace_items_add(EnumPropertyItem **items, int *totitem)
bool IMB_colormanagement_set_whitepoint(const float whitepoint[3], float &temperature, float &tint)
const char * IMB_colormanagement_colorspace_get_indexed_name(int index)
blender::StringRefNull IMB_colormanagement_space_get_interop_id(const ColorSpace *colorspace)
ColormanageProcessor * IMB_colormanagement_colorspace_processor_new(const char *from_colorspace, const char *to_colorspace)
void IMB_colormanagement_assign_float_colorspace(ImBuf *ibuf, const char *name)
BLI_INLINE void IMB_colormanagement_srgb_to_scene_linear_v3(float scene_linear[3], const float srgb[3])
void IMB_colormanagement_wavelength_to_rgb(float r_dest[4], float value)
const char * IMB_colormanagement_display_get_none_name()
const ColorSpace * IMB_colormanagement_space_get_named(const char *name)
BLI_INLINE void IMB_colormanagement_scene_linear_to_rec2020(float rec2020[3], const float scene_linear[3])
bool IMB_colormanagement_display_is_hdr(const ColorManagedDisplaySettings *display_settings, const char *view_name)
unsigned char * IMB_display_buffer_acquire_ctx(const bContext *C, ImBuf *ibuf, void **cache_handle)
ColorManagedDisplaySpace
@ DISPLAY_SPACE_VIDEO_OUTPUT
@ DISPLAY_SPACE_IMAGE_OUTPUT
@ DISPLAY_SPACE_DRAW
@ DISPLAY_SPACE_COLOR_INSPECTION
void IMB_colormanagement_imbuf_to_byte_texture(unsigned char *out_buffer, int offset_x, int offset_y, int width, int height, const ImBuf *ibuf, bool store_premultiplied)
int IMB_colormanagement_working_space_get_named_index(const char *name)
blender::float3x3 IMB_colormanagement_get_scene_linear_to_xyz()
bool IMB_colormanagement_space_is_scene_linear(const ColorSpace *colorspace)
void IMB_colormanagement_color_picking_to_scene_linear_v3(float scene_linear[3], const float color_picking[3])
void IMB_colormanagement_view_items_add(EnumPropertyItem **items, int *totitem, const char *display_name)
const char * IMB_colormanagement_view_get_raw_or_default_name(const char *display_name)
ColorManagedFileOutput
unsigned char * IMB_display_buffer_acquire(ImBuf *ibuf, const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings, void **cache_handle)
const char * IMB_colormanagement_look_get_default_name()
void IMB_colormanagement_check_is_data(ImBuf *ibuf, const char *name)
bool IMB_colormanagement_setup_glsl_draw(const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings, float dither, bool predivide)
const char * IMB_colormanagement_look_get_indexed_name(int index)
bool IMB_colormanagement_space_name_is_srgb(const char *name)
bool IMB_colormanagement_space_name_is_scene_linear(const char *name)
const char * IMB_colormanagement_look_validate_for_view(const char *view_name, const char *look_name)
void IMB_colormanagement_imbuf_make_display_space(ImBuf *ibuf, const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings, const ColorManagedDisplaySpace display_space=DISPLAY_SPACE_DRAW)
void IMB_colormanagement_working_space_init_startup(Main *bmain)
void IMB_partial_display_buffer_update_threaded(ImBuf *ibuf, const float *linear_buffer, const unsigned char *byte_buffer, int stride, int offset_x, int offset_y, const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings, int xmin, int ymin, int xmax, int ymax)
void IMB_colormanagement_colorspace_to_scene_linear(float *buffer, int width, int height, int channels, const ColorSpace *colorspace, bool predivide)
void IMB_colormanagement_transform_float(float *buffer, int width, int height, int channels, const char *from_colorspace, const char *to_colorspace, bool predivide)
bool IMB_colormanagement_space_is_data(const ColorSpace *colorspace)
@ COLOR_ROLE_DEFAULT_FLOAT
@ COLOR_ROLE_ACES_INTERCHANGE
@ COLOR_ROLE_DATA
@ COLOR_ROLE_DEFAULT_BYTE
@ COLOR_ROLE_SCENE_LINEAR
@ COLOR_ROLE_COLOR_PICKING
@ COLOR_ROLE_DEFAULT_SEQUENCER
@ COLOR_ROLE_TEXTURE_PAINTING
BLI_INLINE void IMB_colormanagement_scene_linear_to_rec709(float rec709[3], const float scene_linear[3])
const char * IMB_colormanagement_view_get_name_by_id(int index)
bool IMB_colormanagement_processor_is_noop(ColormanageProcessor *cm_processor)
void IMB_colormanagement_check_file_config(Main *bmain)
void IMB_colormanagement_blackbody_temperature_to_rgb_table(float *r_table, int width, float min, float max)
ImBuf * IMB_colormanagement_imbuf_for_write(ImBuf *ibuf, bool save_as_render, bool allocate_result, const ImageFormatData *image_format)
bool IMB_colormanagement_space_name_is_data(const char *name)
bool IMB_colormanagement_setup_glsl_draw_from_space_ctx(const bContext *C, const ColorSpace *from_colorspace, float dither, bool predivide)
bool IMB_colormanagement_display_processor_needed(const ImBuf *ibuf, const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings)
const char * IMB_colormanagement_working_space_get()
bool IMB_colormanagement_space_to_cicp(const ColorSpace *colorspace, const ColorManagedFileOutput output, const bool rgb_matrix, int cicp[4])
const char * IMB_colormanagement_srgb_colorspace_name_get()
void IMB_colormanagement_validate_settings(const ColorManagedDisplaySettings *display_settings, ColorManagedViewSettings *view_settings)
void IMB_colormanagement_colorspace_from_ibuf_ftype(ColorManagedColorspaceSettings *colorspace_settings, ImBuf *ibuf)
void IMB_colormanagement_processor_apply_v3(ColormanageProcessor *cm_processor, float pixel[3])
BLI_INLINE void IMB_colormanagement_aces_to_scene_linear(float scene_linear[3], const float aces[3])
void IMB_colormanagegent_copy_settings(ImBuf *ibuf_src, ImBuf *ibuf_dst)
void IMB_colormanagement_processor_apply(ColormanageProcessor *cm_processor, float *buffer, int width, int height, int channels, bool predivide)
const char * IMB_colormanagement_colorspace_get_name(const ColorSpace *colorspace)
const char * IMB_colormanagement_space_from_filepath_rules(const char *filepath)
bool IMB_colormanagement_setup_glsl_draw_ctx(const bContext *C, float dither, bool predivide)
blender::Vector< char > IMB_colormanagement_space_to_icc_profile(const ColorSpace *colorspace)
void IMB_display_buffer_release(void *cache_handle)
void IMB_colormanagement_get_whitepoint(const float temperature, const float tint, float whitepoint[3])
int IMB_colormanagement_view_get_id_by_name(const char *name)
BLI_INLINE float IMB_colormanagement_get_luminance(const float rgb[3])
BLI_INLINE void IMB_colormanagement_rec2020_to_scene_linear(float scene_linear[3], const float rec2020[3])
const char * IMB_colormanagement_role_colorspace_name_get(int role)
void IMB_colormanagement_display_settings_from_ctx(const bContext *C, ColorManagedViewSettings **r_view_settings, ColorManagedDisplaySettings **r_display_settings)
const char * IMB_colormanagement_get_float_colorspace(const ImBuf *ibuf)
blender::float3x3 IMB_colormanagement_get_xyz_to_scene_linear()
const char * IMB_colormanagement_display_get_indexed_name(int index)
BLI_INLINE void IMB_colormanagement_xyz_to_scene_linear(float scene_linear[3], const float xyz[3])
const char * IMB_colormanagement_view_get_default_name(const char *display_name)
const ColorSpace * IMB_colormanagement_space_from_cicp(const int cicp[4], const ColorManagedFileOutput output)
void IMB_colormanagement_finish_glsl_draw()
void IMB_colormanagement_colorspace_to_scene_linear_v4(float pixel[4], bool predivide, const ColorSpace *colorspace)
ColormanageProcessor * IMB_colormanagement_display_processor_new(const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings, const ColorManagedDisplaySpace display_space=DISPLAY_SPACE_DRAW, const bool inverse=false)
BLI_INLINE void IMB_colormanagement_rec709_to_scene_linear(float scene_linear[3], const float rec709[3])
int IMB_colormanagement_look_get_named_index(const char *name)
BLI_INLINE void IMB_colormanagement_scene_linear_to_xyz(float xyz[3], const float scene_linear[3])
const char * IMB_colormanagement_display_get_default_view_transform_name(const ColorManagedDisplay *display)
void IMB_colormanagement_transform_byte(unsigned char *buffer, int width, int height, int channels, const char *from_colorspace, const char *to_colorspace)
const char * IMB_colormanagement_working_space_get_default()
BLI_INLINE void IMB_colormanagement_scene_linear_to_aces(float aces[3], const float scene_linear[3])
const ColorSpace * IMB_colormanagement_space_from_interop_id(blender::StringRefNull interop_id)
BLI_INLINE void IMB_colormanagement_get_luminance_coefficients(float r_rgb[3])
void IMB_colormanagement_display_to_scene_linear_v3(float pixel[3], const ColorManagedDisplay *display, const ColorManagedDisplaySpace display_space=DISPLAY_SPACE_DRAW)
void IMB_colormanagement_display_items_add(EnumPropertyItem **items, int *totitem)
const ColorManagedDisplay * IMB_colormanagement_display_get_named(const char *name)
void IMB_colormanagement_scene_linear_to_color_picking_v3(float color_picking[3], const float scene_linear[3])
void IMB_colormanagement_scene_linear_to_colorspace(float *buffer, int width, int height, int channels, const ColorSpace *colorspace)
void IMB_colormanagement_working_space_init_default(Main *bmain)
void IMB_colormanagement_blackbody_temperature_to_rgb(float r_dest[4], float value)
int IMB_colormanagement_colorspace_get_named_index(const char *name)
void IMB_colormanagement_imbuf_to_float_texture(float *out_buffer, int offset_x, int offset_y, int width, int height, const ImBuf *ibuf, bool store_premultiplied)
ColormanageProcessor * IMB_colormanagement_display_processor_for_imbuf(const ImBuf *ibuf, const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings, const ColorManagedDisplaySpace display_space=DISPLAY_SPACE_DRAW)
void IMB_partial_display_buffer_update(ImBuf *ibuf, const float *linear_buffer, const unsigned char *byte_buffer, int stride, int offset_x, int offset_y, const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings, int xmin, int ymin, int xmax, int ymax)
BLI_INLINE void IMB_colormanagement_acescg_to_scene_linear(float scene_linear[3], const float acescg[3])
void IMB_display_buffer_transform_apply(unsigned char *display_buffer, float *linear_buffer, int width, int height, int channels, const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings, bool predivide)
void IMB_colormanagement_processor_apply_v4_predivide(ColormanageProcessor *cm_processor, float pixel[4])
void IMB_colormanagement_look_items_add(EnumPropertyItem **items, int *totitem, const char *view_name)
void IMB_colormanagement_scene_linear_to_display_v3(float pixel[3], const ColorManagedDisplay *display, const ColorManagedDisplaySpace display_space=DISPLAY_SPACE_DRAW)
const ColorSpace * IMB_colormangement_display_get_color_space(const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings)
void IMB_colormanagement_working_space_items_add(EnumPropertyItem **items, int *totitem)
void IMB_colormanagement_processor_free(ColormanageProcessor *cm_processor)
bool IMB_colormanagement_setup_glsl_draw_to_scene_linear(const char *from_colorspace_name, bool predivide)
void IMB_partial_display_buffer_update_delayed(ImBuf *ibuf, int xmin, int ymin, int xmax, int ymax)
void IMB_colormanagement_transform_v4(float pixel[4], const char *from_colorspace, const char *to_colorspace)
void IMB_colormanagement_working_space_check(Main *bmain, const bool for_undo, const bool have_editable_assets)
void IMB_colormanagement_processor_apply_v4(ColormanageProcessor *cm_processor, float pixel[4])
int IMB_colormanagement_display_get_named_index(const char *name)
void IMB_colormanagement_init_untonemapped_view_settings(ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings)
const char * IMB_colormanagement_display_get_default_name()
bool IMB_colormanagement_space_is_srgb(const ColorSpace *colorspace)
bool IMB_colormanagement_display_is_wide_gamut(const ColorManagedDisplaySettings *display_settings, const char *view_name)
bool IMB_colormanagement_setup_glsl_draw_from_space(const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings, const ColorSpace *from_colorspace, float dither, bool predivide, bool do_overlay_merge)
void IMB_colormanagement_working_space_convert(Main *bmain, const blender::float3x3 &current_scene_linear_to_xyz, const blender::float3x3 &new_xyz_to_scene_linear, const bool depsgraph_tag=false, const bool linked_only=false, const bool editable_assets_only=false)
void IMB_colormanagement_processor_apply_pixel(ColormanageProcessor *cm_processor, float *pixel, int channels)
BLI_INLINE void IMB_colormanagement_scene_linear_to_srgb_v3(float srgb[3], const float scene_linear[3])
const char * IMB_colormanagement_working_space_get_indexed_name(int index)
BLI_INLINE void IMB_colormanagement_scene_linear_to_acescg(float acescg[3], const float scene_linear[3])
void IMB_colormanagement_wavelength_to_rgb_table(float *r_table, int width)
#define C
Definition RandGen.cpp:29
blender::ocio::Display ColorManagedDisplay
#define output
MatBase< C, R > inverse(MatBase< C, R >) RET
MatBase< float, 3, 3 > float3x3
const char * name
#define min(a, b)
Definition sort.cc:36
Definition DNA_ID.h:414
max
Definition text_draw.cc:251