Blender  V2.93
IMB_colormanagement.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2012 by Blender Foundation.
17  * All rights reserved.
18  */
19 
20 #pragma once
21 
26 #include "BLI_compiler_compat.h"
27 #include "BLI_sys_types.h"
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
33 #define BCM_CONFIG_FILE "config.ocio"
34 
39 struct EnumPropertyItem;
40 struct ImBuf;
41 struct ImageFormatData;
42 struct Main;
43 struct bContext;
44 
45 struct ColorManagedDisplay;
46 struct ColorSpace;
47 
48 /* ** Generic functions ** */
49 
51 
53  const struct ColorManagedDisplaySettings *display_settings,
54  struct ColorManagedViewSettings *view_settings);
55 
57 void IMB_colormanagement_check_is_data(struct ImBuf *ibuf, const char *name);
58 void IMB_colormanagegent_copy_settings(struct ImBuf *ibuf_src, struct ImBuf *ibuf_dst);
59 void IMB_colormanagement_assign_float_colorspace(struct ImBuf *ibuf, const char *name);
60 void IMB_colormanagement_assign_rect_colorspace(struct ImBuf *ibuf, const char *name);
61 
62 const char *IMB_colormanagement_get_float_colorspace(struct ImBuf *ibuf);
63 const char *IMB_colormanagement_get_rect_colorspace(struct ImBuf *ibuf);
64 
65 bool IMB_colormanagement_space_is_data(struct ColorSpace *colorspace);
67 bool IMB_colormanagement_space_is_srgb(struct ColorSpace *colorspace);
69 
70 BLI_INLINE float IMB_colormanagement_get_luminance(const float rgb[3]);
71 BLI_INLINE unsigned char IMB_colormanagement_get_luminance_byte(const unsigned char[3]);
72 BLI_INLINE void IMB_colormangement_xyz_to_rgb(float rgb[3], const float xyz[3]);
73 BLI_INLINE void IMB_colormangement_rgb_to_xyz(float xyz[3], const float rgb[3]);
74 const float *IMB_colormangement_get_xyz_to_rgb(void);
75 
76 /* ** Color space transformation functions ** */
78  int width,
79  int height,
80  int channels,
81  const char *from_colorspace,
82  const char *to_colorspace,
83  bool predivide);
85  int width,
86  int height,
87  int channels,
88  const char *from_colorspace,
89  const char *to_colorspace,
90  bool predivide);
91 void IMB_colormanagement_transform_byte(unsigned char *buffer,
92  int width,
93  int height,
94  int channels,
95  const char *from_colorspace,
96  const char *to_colorspace);
98  int width,
99  int height,
100  int channels,
101  const char *from_colorspace,
102  const char *to_colorspace);
103 void IMB_colormanagement_transform_from_byte(float *float_buffer,
104  unsigned char *byte_buffer,
105  int width,
106  int height,
107  int channels,
108  const char *from_colorspace,
109  const char *to_colorspace);
110 void IMB_colormanagement_transform_from_byte_threaded(float *float_buffer,
111  unsigned char *byte_buffer,
112  int width,
113  int height,
114  int channels,
115  const char *from_colorspace,
116  const char *to_colorspace);
117 void IMB_colormanagement_transform_v4(float pixel[4],
118  const char *from_colorspace,
119  const char *to_colorspace);
120 
122  struct ColorSpace *colorspace);
124  bool predivide,
125  struct ColorSpace *colorspace);
126 
128  struct ColorSpace *colorspace);
129 
131  int width,
132  int height,
133  int channels,
134  struct ColorSpace *colorspace,
135  bool predivide);
136 
137 void IMB_colormanagement_imbuf_to_byte_texture(unsigned char *out_buffer,
138  const int x,
139  const int y,
140  const int width,
141  const int height,
142  const struct ImBuf *ibuf,
143  const bool compress_as_srgb,
144  const bool store_premultiplied);
145 void IMB_colormanagement_imbuf_to_float_texture(float *out_buffer,
146  const int offset_x,
147  const int offset_y,
148  const int width,
149  const int height,
150  const struct ImBuf *ibuf,
151  const bool store_premultiplied);
152 
155 
158 
160  struct ColorManagedDisplay *display);
162  struct ColorManagedDisplay *display);
163 
165  float result[4],
166  const float pixel[4],
167  const struct ColorManagedViewSettings *view_settings,
168  const struct ColorManagedDisplaySettings *display_settings);
169 
171  float result[3],
172  const float pixel[3],
173  const struct ColorManagedViewSettings *view_settings,
174  const struct ColorManagedDisplaySettings *display_settings);
175 
177  struct ImBuf *ibuf,
178  const struct ColorManagedViewSettings *view_settings,
179  const struct ColorManagedDisplaySettings *display_settings);
180 
182  struct ImBuf *ibuf,
183  bool save_as_render,
184  bool allocate_result,
185  const struct ColorManagedViewSettings *view_settings,
186  const struct ColorManagedDisplaySettings *display_settings,
187  struct ImageFormatData *image_format_data);
188 
190  float *buffer,
191  unsigned char *display_buffer,
192  int width,
193  int height,
194  int channels,
195  float dither,
196  const struct ColorManagedViewSettings *view_settings,
197  const struct ColorManagedDisplaySettings *display_settings);
198 
199 /* ** Public display buffers interfaces ** */
200 
202  const struct bContext *C,
203  struct ColorManagedViewSettings **r_view_settings,
204  struct ColorManagedDisplaySettings **r_display_settings);
205 
207  const struct ColorManagedViewSettings *view_settings,
208  const struct ColorManagedDisplaySettings *display_settings);
209 
211  struct ImBuf *ibuf,
212  const struct ColorManagedViewSettings *view_settings,
213  const struct ColorManagedDisplaySettings *display_settings,
214  void **cache_handle);
215 unsigned char *IMB_display_buffer_acquire_ctx(const struct bContext *C,
216  struct ImBuf *ibuf,
217  void **cache_handle);
218 
219 void IMB_display_buffer_transform_apply(unsigned char *display_buffer,
220  float *linear_buffer,
221  int width,
222  int height,
223  int channels,
224  const struct ColorManagedViewSettings *view_settings,
225  const struct ColorManagedDisplaySettings *display_settings,
226  bool predivide);
227 
228 void IMB_display_buffer_release(void *cache_handle);
229 
230 /* ** Display functions ** */
237  struct ColorManagedDisplay *display);
238 
239 /* ** View functions ** */
242 
243 /* ** Look functions ** */
246 
247 /* ** Color space functions ** */
250 const char *IMB_colormanagement_view_get_default_name(const char *display_name);
251 
253  struct ColorManagedColorspaceSettings *colorspace_settings, struct ImBuf *ibuf);
254 
255 /* ** RNA helper functions ** */
256 void IMB_colormanagement_display_items_add(struct EnumPropertyItem **items, int *totitem);
258  int *totitem,
259  const char *display_name);
261  int *totitem,
262  const char *view_name);
263 void IMB_colormanagement_colorspace_items_add(struct EnumPropertyItem **items, int *totitem);
264 
265 /* ** Tile-based buffer management ** */
267  const float *linear_buffer,
268  const unsigned char *byte_buffer,
269  int stride,
270  int offset_x,
271  int offset_y,
272  const struct ColorManagedViewSettings *view_settings,
273  const struct ColorManagedDisplaySettings *display_settings,
274  int xmin,
275  int ymin,
276  int xmax,
277  int ymax);
278 
280  struct ImBuf *ibuf,
281  const float *linear_buffer,
282  const unsigned char *byte_buffer,
283  int stride,
284  int offset_x,
285  int offset_y,
286  const struct ColorManagedViewSettings *view_settings,
287  const struct ColorManagedDisplaySettings *display_settings,
288  int xmin,
289  int ymin,
290  int xmax,
291  int ymax);
292 
294  struct ImBuf *ibuf, int xmin, int ymin, int xmax, int ymax);
295 
296 /* ** Pixel processor functions ** */
298  const struct ColorManagedViewSettings *view_settings,
299  const struct ColorManagedDisplaySettings *display_settings);
301  const char *from_colorspace, const char *to_colorspace);
303  float pixel[4]);
305  float pixel[4]);
307  float pixel[3]);
309  float *pixel,
310  int channels);
312  float *buffer,
313  int width,
314  int height,
315  int channels,
316  bool predivide);
318  unsigned char *buffer,
319  int width,
320  int height,
321  int channels);
323 
324 /* ** OpenGL drawing routines using GLSL for color space transform ** */
325 
326 /* Test if GLSL drawing is supported for combination of graphics card and this configuration */
328 /* Configures GLSL shader for conversion from scene linear to display space */
330  const struct ColorManagedViewSettings *view_settings,
331  const struct ColorManagedDisplaySettings *display_settings,
332  float dither,
333  bool predivide);
334 /* Same as above, but display space conversion happens from a specified space */
336  const struct ColorManagedViewSettings *view_settings,
337  const struct ColorManagedDisplaySettings *display_settings,
338  struct ColorSpace *colorspace,
339  float dither,
340  bool predivide,
341  bool do_overlay_merge);
342 /* Same as setup_glsl_draw, but color management settings are guessing from a given context */
344  float dither,
345  bool predivide);
346 /* Same as setup_glsl_draw_from_space,
347  * but color management settings are guessing from a given context. */
349  struct ColorSpace *colorspace,
350  float dither,
351  bool predivide);
352 /* Finish GLSL-based display space conversion */
354 
355 /* ** View transform ** */
357  struct ColorManagedViewSettings *view_settings,
358  const struct ColorManagedDisplaySettings *display_settings);
359 
360 /* Roles */
361 enum {
369 };
370 
371 #ifdef __cplusplus
372 }
373 #endif
374 
#define BLI_INLINE
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei width
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei height
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei stride
const char * IMB_colormanagement_colorspace_get_indexed_name(int index)
bool IMB_colormanagement_space_is_srgb(struct ColorSpace *colorspace)
void IMB_colormanagement_processor_apply(struct ColormanageProcessor *cm_processor, float *buffer, int width, int height, int channels, bool predivide)
void IMB_partial_display_buffer_update_delayed(struct ImBuf *ibuf, int xmin, int ymin, int xmax, int ymax)
void IMB_partial_display_buffer_update_threaded(struct ImBuf *ibuf, const float *linear_buffer, const unsigned char *byte_buffer, int stride, int offset_x, int offset_y, const struct ColorManagedViewSettings *view_settings, const struct ColorManagedDisplaySettings *display_settings, int xmin, int ymin, int xmax, int ymax)
void IMB_colormanagement_pixel_to_display_space_v4(float result[4], const float pixel[4], const struct ColorManagedViewSettings *view_settings, const struct ColorManagedDisplaySettings *display_settings)
bool IMB_colormanagement_space_is_scene_linear(struct ColorSpace *colorspace)
void IMB_colormanagement_processor_apply_pixel(struct ColormanageProcessor *cm_processor, float *pixel, int channels)
void IMB_colormanagement_display_to_scene_linear_v3(float pixel[3], struct ColorManagedDisplay *display)
BLI_INLINE void IMB_colormangement_xyz_to_rgb(float rgb[3], const float xyz[3])
void IMB_colormanagement_colorspace_to_scene_linear(float *buffer, int width, int height, int channels, struct ColorSpace *colorspace, bool predivide)
void IMB_colormanagement_colorspace_from_ibuf_ftype(struct ColorManagedColorspaceSettings *colorspace_settings, struct ImBuf *ibuf)
void IMB_display_buffer_transform_apply(unsigned char *display_buffer, float *linear_buffer, int width, int height, int channels, const struct ColorManagedViewSettings *view_settings, const struct ColorManagedDisplaySettings *display_settings, bool predivide)
const char * IMB_colormanagement_get_rect_colorspace(struct ImBuf *ibuf)
void IMB_colormanagement_imbuf_to_byte_texture(unsigned char *out_buffer, const int x, const int y, const int width, const int height, const struct ImBuf *ibuf, const bool compress_as_srgb, const bool store_premultiplied)
unsigned char * IMB_display_buffer_acquire_ctx(const struct bContext *C, struct ImBuf *ibuf, void **cache_handle)
void IMB_colormanagement_processor_apply_v3(struct ColormanageProcessor *cm_processor, float pixel[3])
const char * IMB_colormanagement_get_display_colorspace_name(const struct ColorManagedViewSettings *view_settings, const struct ColorManagedDisplaySettings *display_settings)
struct ImBuf * IMB_colormanagement_imbuf_for_write(struct ImBuf *ibuf, bool save_as_render, bool allocate_result, const struct ColorManagedViewSettings *view_settings, const struct ColorManagedDisplaySettings *display_settings, struct ImageFormatData *image_format_data)
void IMB_colormanagement_look_items_add(struct EnumPropertyItem **items, int *totitem, const char *view_name)
const char * IMB_colormanagement_view_get_default_name(const char *display_name)
void IMB_colormanagement_processor_apply_byte(struct ColormanageProcessor *cm_processor, unsigned char *buffer, int width, int height, int channels)
struct ColormanageProcessor * IMB_colormanagement_colorspace_processor_new(const char *from_colorspace, const char *to_colorspace)
void IMB_colormanagegent_copy_settings(struct ImBuf *ibuf_src, struct ImBuf *ibuf_dst)
void IMB_colormanagement_display_settings_from_ctx(const struct bContext *C, struct ColorManagedViewSettings **r_view_settings, struct ColorManagedDisplaySettings **r_display_settings)
void IMB_colormanagement_imbuf_make_display_space(struct ImBuf *ibuf, const struct ColorManagedViewSettings *view_settings, const struct ColorManagedDisplaySettings *display_settings)
bool IMB_colormanagement_setup_glsl_draw_from_space_ctx(const struct bContext *C, struct ColorSpace *colorspace, float dither, bool predivide)
void IMB_colormanagement_pixel_to_display_space_v3(float result[3], const float pixel[3], const struct ColorManagedViewSettings *view_settings, const struct ColorManagedDisplaySettings *display_settings)
void IMB_colormanagement_color_picking_to_scene_linear_v3(float pixel[3])
int IMB_colormanagement_view_get_named_index(const char *name)
BLI_INLINE unsigned char IMB_colormanagement_get_luminance_byte(const unsigned char[3])
void IMB_colormanagement_transform_from_byte_threaded(float *float_buffer, unsigned char *byte_buffer, int width, int height, int channels, const char *from_colorspace, const char *to_colorspace)
bool IMB_colormanagement_space_name_is_data(const char *name)
void IMB_colormanagement_buffer_make_display_space(float *buffer, unsigned char *display_buffer, int width, int height, int channels, float dither, const struct ColorManagedViewSettings *view_settings, const struct ColorManagedDisplaySettings *display_settings)
void IMB_colormanagement_processor_free(struct ColormanageProcessor *cm_processor)
BLI_INLINE void IMB_colormangement_rgb_to_xyz(float xyz[3], const float rgb[3])
void IMB_colormanagement_transform_from_byte(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_float_colorspace(struct ImBuf *ibuf, const char *name)
void IMB_colormanagement_transform_threaded(float *buffer, int width, int height, int channels, const char *from_colorspace, const char *to_colorspace, bool predivide)
void IMB_colormanagement_validate_settings(const struct ColorManagedDisplaySettings *display_settings, struct ColorManagedViewSettings *view_settings)
void IMB_colormanagement_transform_byte_threaded(unsigned char *buffer, int width, int height, int channels, const char *from_colorspace, const char *to_colorspace)
void IMB_colormanagement_processor_apply_v4(struct ColormanageProcessor *cm_processor, float pixel[4])
void IMB_display_buffer_release(void *cache_handle)
void IMB_colormanagement_colorspace_to_scene_linear_v4(float pixel[4], bool predivide, struct ColorSpace *colorspace)
struct ColormanageProcessor * IMB_colormanagement_display_processor_new(const struct ColorManagedViewSettings *view_settings, const struct ColorManagedDisplaySettings *display_settings)
BLI_INLINE float IMB_colormanagement_get_luminance(const float rgb[3])
void IMB_colormanagement_check_file_config(struct Main *bmain)
void IMB_colormanagement_assign_rect_colorspace(struct ImBuf *ibuf, const char *name)
void IMB_colormanagement_scene_linear_to_colorspace_v3(float pixel[3], struct ColorSpace *colorspace)
const float * IMB_colormangement_get_xyz_to_rgb(void)
bool IMB_colormanagement_setup_glsl_draw(const struct ColorManagedViewSettings *view_settings, const struct ColorManagedDisplaySettings *display_settings, float dither, bool predivide)
void IMB_colormanagement_init_default_view_settings(struct ColorManagedViewSettings *view_settings, const struct ColorManagedDisplaySettings *display_settings)
unsigned char * IMB_display_buffer_acquire(struct ImBuf *ibuf, const struct ColorManagedViewSettings *view_settings, const struct ColorManagedDisplaySettings *display_settings, void **cache_handle)
const char * IMB_colormanagement_display_get_default_name(void)
void IMB_colormanagement_scene_linear_to_srgb_v3(float pixel[3])
bool IMB_colormanagement_setup_glsl_draw_ctx(const struct bContext *C, float dither, bool predivide)
void IMB_colormanagement_scene_linear_to_display_v3(float pixel[3], struct ColorManagedDisplay *display)
const char * IMB_colormanagement_display_get_none_name(void)
const char * IMB_colormanagement_view_get_indexed_name(int index)
int IMB_colormanagement_look_get_named_index(const char *name)
const char * IMB_colormanagement_role_colorspace_name_get(int role)
bool IMB_colormanagement_space_is_data(struct ColorSpace *colorspace)
void IMB_colormanagement_check_is_data(struct ImBuf *ibuf, const char *name)
void IMB_colormanagement_transform_byte(unsigned char *buffer, int width, int height, int channels, const char *from_colorspace, const char *to_colorspace)
void IMB_colormanagement_colorspace_to_scene_linear_v3(float pixel[3], struct ColorSpace *colorspace)
@ COLOR_ROLE_DEFAULT_FLOAT
@ COLOR_ROLE_DATA
@ COLOR_ROLE_DEFAULT_BYTE
@ COLOR_ROLE_SCENE_LINEAR
@ COLOR_ROLE_COLOR_PICKING
@ COLOR_ROLE_DEFAULT_SEQUENCER
@ COLOR_ROLE_TEXTURE_PAINTING
struct ColorManagedDisplay * IMB_colormanagement_display_get_named(const char *name)
void IMB_colormanagement_finish_glsl_draw(void)
void IMB_colormanagement_processor_apply_v4_predivide(struct ColormanageProcessor *cm_processor, float pixel[4])
int IMB_colormanagement_colorspace_get_named_index(const char *name)
void IMB_colormanagement_scene_linear_to_color_picking_v3(float pixel[3])
const char * IMB_colormanagement_look_get_indexed_name(int index)
bool IMB_colormanagement_setup_glsl_draw_from_space(const struct ColorManagedViewSettings *view_settings, const struct ColorManagedDisplaySettings *display_settings, struct ColorSpace *colorspace, float dither, bool predivide, bool do_overlay_merge)
const char * IMB_colormanagement_display_get_default_view_transform_name(struct ColorManagedDisplay *display)
void IMB_colormanagement_transform_v4(float pixel[4], const char *from_colorspace, const char *to_colorspace)
bool IMB_colormanagement_support_glsl_draw(const struct ColorManagedViewSettings *view_settings)
const char * IMB_colormanagement_display_get_indexed_name(int index)
void IMB_colormanagement_display_items_add(struct EnumPropertyItem **items, int *totitem)
void IMB_colormanagement_transform(float *buffer, int width, int height, int channels, const char *from_colorspace, const char *to_colorspace, bool predivide)
int IMB_colormanagement_display_get_named_index(const char *name)
void IMB_partial_display_buffer_update(struct ImBuf *ibuf, const float *linear_buffer, const unsigned char *byte_buffer, int stride, int offset_x, int offset_y, const struct ColorManagedViewSettings *view_settings, const struct ColorManagedDisplaySettings *display_settings, int xmin, int ymin, int xmax, int ymax)
void IMB_colormanagement_srgb_to_scene_linear_v3(float pixel[3])
void IMB_colormanagement_view_items_add(struct EnumPropertyItem **items, int *totitem, const char *display_name)
void IMB_colormanagement_imbuf_to_float_texture(float *out_buffer, const int offset_x, const int offset_y, const int width, const int height, const struct ImBuf *ibuf, const bool store_premultiplied)
void IMB_colormanagement_colorspace_items_add(struct EnumPropertyItem **items, int *totitem)
const char * IMB_colormanagement_get_float_colorspace(struct ImBuf *ibuf)
#define C
Definition: RandGen.cpp:39
__kernel void ccl_constant KernelData ccl_global void ccl_global char ccl_global int ccl_global char ccl_global unsigned int ccl_global float * buffer
char name[MAX_COLORSPACE_NAME]
char name[MAX_COLORSPACE_NAME]
int channels
float dither
char name[IMB_FILENAME_SIZE]
Definition: BKE_main.h:116