105#define DT_IOP_COLOR_ICC_LEN 512
169 return _(
"input color profile");
175 "using color profiles to remap RGB values"),
177 _(
"linear or non-linear, RGB, scene-referred"),
178 _(
"defined by profile"),
179 _(
"linear, RGB, scene-referred"));
227 "[colorin] profile `%s' not suitable for work profile. it has been replaced by linear Rec2020 RGB!\n",
230 work_filename[0] =
'\0';
234 void *new_params,
const int new_version)
236#define DT_IOP_COLOR_ICC_LEN_V5 100
238 if(old_version == 1 && new_version == 7)
248 memset(
new, 0,
sizeof(*
new));
254 else if(!strcmp(old->
iccprofile,
"matrix_in_to_work"))
256 else if(!strcmp(old->
iccprofile,
"darktable"))
260 else if(!strcmp(old->
iccprofile,
"alternate"))
266 else if(!strcmp(old->
iccprofile,
"linear_rec709_rgb") || !strcmp(old->
iccprofile,
"linear_rgb"))
268 else if(!strcmp(old->
iccprofile,
"linear_rec2020_rgb"))
279 g_strlcpy(new->filename, old->
iccprofile,
sizeof(new->filename));
282 new->intent = old->
intent;
284 new->blue_mapping = 1;
286 new->filename_work[0] =
'\0';
289 if(old_version == 2 && new_version == 7)
291 typedef struct dt_iop_colorin_params_v2_t
296 } dt_iop_colorin_params_v2_t;
298 const dt_iop_colorin_params_v2_t *old = (dt_iop_colorin_params_v2_t *)old_params;
300 memset(
new, 0,
sizeof(*
new));
302 if(!strcmp(old->iccprofile,
"eprofile"))
304 else if(!strcmp(old->iccprofile,
"ematrix"))
306 else if(!strcmp(old->iccprofile,
"matrix_in_to_work"))
308 else if(!strcmp(old->iccprofile,
"darktable"))
310 else if(!strcmp(old->iccprofile,
"vendor"))
312 else if(!strcmp(old->iccprofile,
"alternate"))
314 else if(!strcmp(old->iccprofile,
"sRGB"))
316 else if(!strcmp(old->iccprofile,
"adobergb"))
318 else if(!strcmp(old->iccprofile,
"linear_rec709_rgb") || !strcmp(old->iccprofile,
"linear_rgb"))
320 else if(!strcmp(old->iccprofile,
"linear_rec2020_rgb"))
322 else if(!strcmp(old->iccprofile,
"infrared"))
324 else if(!strcmp(old->iccprofile,
"XYZ"))
326 else if(!strcmp(old->iccprofile,
"Lab"))
331 g_strlcpy(new->filename, old->iccprofile,
sizeof(new->filename));
334 new->intent = old->intent;
335 new->normalize = old->normalize;
336 new->blue_mapping = 1;
338 new->filename_work[0] =
'\0';
341 if(old_version == 3 && new_version == 7)
343 typedef struct dt_iop_colorin_params_v3_t
349 } dt_iop_colorin_params_v3_t;
351 const dt_iop_colorin_params_v3_t *old = (dt_iop_colorin_params_v3_t *)old_params;
353 memset(
new, 0,
sizeof(*
new));
355 if(!strcmp(old->iccprofile,
"eprofile"))
357 else if(!strcmp(old->iccprofile,
"ematrix"))
359 else if(!strcmp(old->iccprofile,
"matrix_in_to_work"))
361 else if(!strcmp(old->iccprofile,
"darktable"))
363 else if(!strcmp(old->iccprofile,
"vendor"))
365 else if(!strcmp(old->iccprofile,
"alternate"))
367 else if(!strcmp(old->iccprofile,
"sRGB"))
369 else if(!strcmp(old->iccprofile,
"adobergb"))
371 else if(!strcmp(old->iccprofile,
"linear_rec709_rgb") || !strcmp(old->iccprofile,
"linear_rgb"))
373 else if(!strcmp(old->iccprofile,
"linear_rec2020_rgb"))
375 else if(!strcmp(old->iccprofile,
"infrared"))
377 else if(!strcmp(old->iccprofile,
"XYZ"))
379 else if(!strcmp(old->iccprofile,
"Lab"))
384 g_strlcpy(new->filename, old->iccprofile,
sizeof(new->filename));
387 new->intent = old->intent;
388 new->normalize = old->normalize;
389 new->blue_mapping = old->blue_mapping;
391 new->filename_work[0] =
'\0';
395 if(old_version == 4 && new_version == 7)
397 typedef struct dt_iop_colorin_params_v4_t
404 } dt_iop_colorin_params_v4_t;
406 const dt_iop_colorin_params_v4_t *old = (dt_iop_colorin_params_v4_t *)old_params;
408 memset(
new, 0,
sizeof(*
new));
410 new->type = old->type;
411 g_strlcpy(new->filename, old->filename,
sizeof(new->filename));
412 new->intent = old->intent;
413 new->normalize = old->normalize;
414 new->blue_mapping = old->blue_mapping;
416 new->filename_work[0] =
'\0';
420 if(old_version == 5 && new_version == 7)
422 typedef struct dt_iop_colorin_params_v5_t
432 } dt_iop_colorin_params_v5_t;
434 const dt_iop_colorin_params_v5_t *old = (dt_iop_colorin_params_v5_t *)old_params;
436 memset(
new, 0,
sizeof(*
new));
438 new->type = old->type;
439 g_strlcpy(new->filename, old->filename,
sizeof(new->filename));
440 new->intent = old->intent;
441 new->normalize = old->normalize;
442 new->blue_mapping = old->blue_mapping;
443 new->type_work = old->type_work;
444 g_strlcpy(new->filename_work, old->filename_work,
sizeof(new->filename_work));
449 if(old_version == 6 && new_version == 7)
453 typedef struct dt_iop_colorin_params_v6_t
463 } dt_iop_colorin_params_v6_t;
465 const dt_iop_colorin_params_v6_t *old = (dt_iop_colorin_params_v6_t *)old_params;
467 memcpy(
new, old,
sizeof(*
new));
473#undef DT_IOP_COLOR_ICC_LEN_V5
478 const int program = 2;
495static void intent_changed (
GtkWidget *widget, gpointer user_data)
517 if(pos < g->n_image_profiles)
524 memcpy(
p->filename, pp->
filename,
sizeof(
p->filename));
537 memcpy(
p->filename, desc.
filename,
sizeof(
p->filename));
564 type_work = work_desc.
type;
565 g_strlcpy(filename_work, work_desc.
filename,
sizeof(filename_work));
570 p->type_work = type_work;
571 g_strlcpy(
p->filename_work, filename_work,
sizeof(
p->filename_work));
577 "[colorin] can't extract matrix from colorspace `%s', it will be replaced by Rec2020 RGB!\n",
579 dt_control_log(_(
"can't extract matrix from colorspace `%s', it will be replaced by Rec2020 RGB!"),
p->filename_work);
603 cl_mem dev_m = NULL, dev_l = NULL, dev_r = NULL, dev_g = NULL, dev_b = NULL, dev_coeffs = NULL;
614 float cmat[12], lmat[12];
620 const int devid = pipe->
devid;
626 size_t origin[] = { 0, 0, 0 };
627 size_t region[] = { roi_in->
width, roi_in->
height, 1 };
629 if(err != CL_SUCCESS)
goto error;
664 if(err != CL_SUCCESS)
goto error;
697 const float YY =
out[0] +
out[1] +
out[2];
700 const float zz =
out[2] / YY;
701 const float bound_z = 0.5f, bound_Y = 0.5f;
702 const float amount = 0.11f;
705 const float t = (zz - bound_z) / (1.0f - bound_z) * fminf(1.0, YY / bound_Y);
706 out[1] +=
t * amount;
707 out[2] -=
t * amount;
726 const gboolean blue_mapping
743 g_strlcpy(
d->filename,
p->filename,
sizeof(
d->filename));
745 d->filename[0] =
'\0';
775 d->type_work =
p->type_work;
776 g_strlcpy(
d->filename_work,
p->filename_work,
sizeof(
d->filename_work));
777 d->blue_mapping =
p->blue_mapping;
785 d->conversion = NULL;
792 if(work_profile_info)
794 d->type_work = work_profile_info->
type;
795 g_strlcpy(
d->filename_work, work_profile_info->
filename,
sizeof(
d->filename_work));
842 .resolved = image_profile };
859 "[colorin] unsupported input profile `%s' has been replaced by linear Rec709 RGB!\n",
863 dt_control_log(_(
"unsupported input profile has been replaced by linear Rec709 RGB!"));
874 dt_iop_fmt_log(self,
"commit: class=%s matrix_supported=%d requested_input=%d resolved_input=%d blue_mapping=%d",
877 requested_type,
type,
d->blue_mapping);
897 input_matrix_for_pipe);
904 d->conversion = conversion;
943 for(
const GList *prof =
g->image_profiles; prof; prof = g_list_next(prof), image_row++)
946 if(pp->
type ==
p->type
978 module->default_enabled = 1;
979 module->hide_enable_button = 1;
982 gboolean new_profile;
984 dt_iop_fmt_log(module,
"reload_defaults: class=%s matrix_supported=%d -> default_input_profile=%d new_profile=%d",
998 g->image_profiles = NULL;
999 g->n_image_profiles = 0;
1012 g->image_profiles = g_list_append(
g->image_profiles, prof);
1022 g->image_profiles = g_list_append(
g->image_profiles, prof);
1032 g->image_profiles = g_list_append(
g->image_profiles, prof);
1044 g->image_profiles = g_list_append(
g->image_profiles, prof);
1058 g->image_profiles = g_list_append(
g->image_profiles, prof);
1072 g->image_profiles = g_list_append(
g->image_profiles, prof);
1078 g->n_image_profiles = pos + 1;
1083 for(GList *l =
g->image_profiles; l; l = g_list_next(l))
1088 gboolean input_system_profile_separator_added =
FALSE;
1089 gboolean input_file_profile_separator_added =
FALSE;
1092 for(
size_t k = 0;
k < n_in_profiles;
k++)
1096 if(
g->n_image_profiles > 0 && !input_system_profile_separator_added)
1099 input_system_profile_separator_added =
TRUE;
1104 input_file_profile_separator_added =
TRUE;
1116 gboolean work_file_profile_separator_added =
FALSE;
1119 for(
size_t k = 0;
k < n_work_profiles;
k++)
1125 work_file_profile_separator_added =
TRUE;
1139 g->image_profiles = NULL;
1158 char *system_profile_dir = g_build_filename(datadir,
"color",
"in", NULL);
1159 char *user_profile_dir = g_build_filename(confdir,
"color",
"in", NULL);
1160 char *
tooltip = g_strdup_printf(_(
"ICC profiles in %s or %s"), user_profile_dir, system_profile_dir);
1161 gtk_widget_set_tooltip_text(
g->profile_combobox,
tooltip);
1169 char *system_profile_dir = g_build_filename(datadir,
"color",
"out", NULL);
1170 char *user_profile_dir = g_build_filename(confdir,
"color",
"out", NULL);
1171 char *
tooltip = g_strdup_printf(_(
"ICC profiles in %s or %s"), user_profile_dir, system_profile_dir);
1172 gtk_widget_set_tooltip_text(
g->work_combobox,
tooltip);
1178 g_signal_connect(G_OBJECT(
g->profile_combobox),
"value-changed", G_CALLBACK(
profile_changed), (gpointer)self);
1179 g_signal_connect(G_OBJECT(
g->work_combobox),
"value-changed", G_CALLBACK(
workicc_changed), (gpointer)self);
1182 gtk_widget_set_tooltip_text(
g->clipping_combobox, _(
"confine Lab values to gamut of RGB color space"));
1188 while(
g->image_profiles)
1191 g->image_profiles = g_list_delete_link(
g->image_profiles,
g->image_profiles);
static void error(char *msg)
void dt_bauhaus_combobox_clear(GtkWidget *widget)
int dt_bauhaus_combobox_get(GtkWidget *widget)
void dt_bauhaus_combobox_add_separator(GtkWidget *widget)
void dt_bauhaus_combobox_set(GtkWidget *widget, const int pos)
void dt_bauhaus_widget_set_label(GtkWidget *widget, const char *label)
GtkWidget * dt_bauhaus_combobox_new(dt_bauhaus_t *bh, dt_gui_module_t *self)
void dt_bauhaus_combobox_add(GtkWidget *widget, const char *text)
void dt_bauhaus_combobox_add_with_tooltip(GtkWidget *widget, const char *text, const char *tooltip)
static __DT_CLONE_TARGETS__ void normalize(float *const buffer, const size_t width, const size_t height, const float norm)
void commit_params(struct dt_iop_module_t *self, dt_iop_params_t *p1, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
const char ** description(struct dt_iop_module_t *self)
static gboolean _is_image_derived(const dt_colorspaces_color_profile_type_t type)
void reload_defaults(dt_iop_module_t *module)
static void profile_changed(GtkWidget *widget, gpointer user_data)
static void apply_blue_mapping(const float *const in, float *const out)
void init_pipe(struct dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
@ DT_NORMALIZE_LINEAR_REC2020_RGB
@ DT_NORMALIZE_LINEAR_REC709_RGB
void output_format(dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece, dt_iop_buffer_dsc_t *dsc)
#define DT_IOP_COLOR_ICC_LEN
void gui_update(struct dt_iop_module_t *self)
void gui_init(struct dt_iop_module_t *self)
static dt_colorspaces_color_profile_type_t _clipping_profile_type(const dt_iop_colorin_params_t *p)
static dt_iop_colorspace_type_t _colorin_format_cst(dt_iop_module_t *self)
#define DT_IOP_COLOR_ICC_LEN_V5
void cleanup_global(dt_iop_module_so_t *module)
static void update_profile_list(dt_iop_module_t *self)
int default_colorspace(dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece)
void input_format(dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece, dt_iop_buffer_dsc_t *dsc)
void gui_cleanup(struct dt_iop_module_t *self)
static void _resolve_work_profile(dt_colorspaces_color_profile_type_t *work_type, char *work_filename)
int process(struct dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, const void *const ivoid, void *const ovoid)
void cleanup_pipe(struct dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
void init_global(dt_iop_module_so_t *module)
static void workicc_changed(GtkWidget *widget, gpointer user_data)
static void _set_input_profile_metadata(dt_iop_colorin_data_t *d, const dt_iop_colorin_params_t *p, const dt_colorspaces_color_profile_type_t type)
int process_cl(struct dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, cl_mem dev_in, cl_mem dev_out)
int legacy_params(dt_iop_module_t *self, const void *const old_params, const int old_version, void *new_params, const int new_version)
static const dt_profiled_colormatrix_t dt_alternate_colormatrices[]
static const int dt_vendor_colormatrix_cnt
static const int dt_alternate_colormatrix_cnt
static const dt_profiled_colormatrix_t dt_vendor_colormatrices[]
static const dt_profiled_colormatrix_t dt_profiled_colormatrices[]
static const int dt_profiled_colormatrix_cnt
dt_iop_order_iccprofile_info_t * dt_colorspaces_add_profile(const dt_colorspaces_color_profile_type_t profile_type, const char *profile_filename, const int intent)
Find-or-build the derived matrix/LUT data for a profile identity, memoised.
void dt_colorspaces_free_image_profile(struct dt_colorspaces_color_profile_t *profile)
Release a profile container owned by an image, closing the LCMS2 handle inside it if and only if the ...
size_t dt_colorspaces_enumerate_profiles(const dt_colorspaces_profile_role_t role, dt_colorprofile_desc_t **out)
Ordered snapshot of every profile registered for one role.
gboolean dt_colorspaces_profile_exists(const dt_colorspaces_profile_role_t role, const dt_colorspaces_color_profile_type_t type, const char *const filename)
Is this identity registered for this direction?
int dt_colorspaces_profile_index(const dt_colorspaces_profile_role_t role, const dt_colorspaces_color_profile_type_t type, const char *const filename)
Combo position of (type, filename) within direction.
const char * dt_colorspaces_get_name(dt_colorspaces_color_profile_type_t type, const char *filename)
Printable name for a profile identity, without touching the profile list.
gboolean dt_colorspaces_profile_at(const dt_colorspaces_profile_role_t role, const int index, dt_colorprofile_desc_t *const out)
Identity of the profile at index within direction.
gboolean dt_colorspaces_is_profile_equal(const char *fullname, const char *filename)
Do these two names refer to the same profile file?
The colour-profile module's API: which profiles exist, and how to apply one.
struct _GtkWidget GtkWidget
GtkWidget, opaque, spelled exactly as GTK spells it.
const dt_colormatrix_t dt_aligned_pixel_t out
gboolean dt_image_is_matrix_correction_supported(const dt_image_t *img)
dt_image_pipe_class_t dt_image_pipe_class(const dt_image_t *img)
const char * dt_image_pipe_class_name(const dt_image_pipe_class_t klass)
void dt_control_log(const char *msg,...)
const float * dt_colorspaces_conversion_source_coeffs(const dt_colorspaces_conversion_t *const conversion)
The 3x3 power-law fits extrapolating the source curves past white, as one flat array of 9 floats in c...
void dt_colorspaces_apply_conversion_hooked(const dt_colorspaces_conversion_t *const conversion, const float *const in, float *const out, const size_t width, const size_t height, const dt_colorspaces_conversion_hook_t hook)
dt_colorspaces_apply_conversion() with a per-pixel hook. See dt_colorspaces_conversion_hook_t for why...
gboolean dt_colorspaces_conversion_has_clipping(const dt_colorspaces_conversion_t *const conversion)
Whether the conversion has a gamut-clipping stage, i.e. whether a clip endpoint was given AND survive...
gboolean dt_colorspaces_conversion_matrix(const dt_colorspaces_conversion_t *const conversion, dt_colormatrix_t matrix)
The composed source-to-target matrix, row-major.
gboolean dt_colorspaces_conversion_is_matrix(const dt_colorspaces_conversion_t *const conversion)
Whether the conversion reduced to matrices and curves, and can therefore be run by a device kernel at...
gboolean dt_colorspaces_conversion_source_matrix(const dt_colorspaces_conversion_t *const conversion, dt_colormatrix_t matrix)
The SOURCE profile's own RGB -> XYZ (D50) matrix, before composition.
const float * dt_colorspaces_conversion_source_curve(const dt_colorspaces_conversion_t *const conversion, const int channel)
One channel of the source decoding curves, DT_CONVERSION_LUT_SAMPLES entries.
void dt_colorspaces_free_conversion(dt_colorspaces_conversion_t **conversion)
Release a conversion and NULL the caller's pointer.
gboolean dt_colorspaces_conversion_clip_matrix(const dt_colorspaces_conversion_t *const conversion, dt_colormatrix_t matrix)
The clip-to-target matrix, the second leg of a clipping conversion.
dt_colorspaces_conversion_t * dt_colorspaces_prepare_conversion(const dt_colorspaces_endpoint_t *const from, const dt_colorspaces_endpoint_t *const to, const dt_colorspaces_endpoint_t *const clip, const dt_colorspaces_endpoint_t *const proof, const dt_iop_color_intent_t intent, const dt_colorspaces_conversion_flags_t flags)
Build a conversion from from to to. The expensive call; do it once.
A PREPARED CONVERSION: everything needed to turn pixels in one colour space into pixels in another,...
dt_colorspaces_conversion_flags_t
What the caller wants, and what the caller can consume.
@ DT_CONVERSION_SOURCE_CURVES
The caller can apply the SOURCE profile's decoding curves before the matrix. Without this,...
struct dt_bauhaus_t * dt_bauhaus_get_global(void)
#define dt_dev_add_history_item(dev, module, enable, redraw)
#define dt_dev_pixelpipe_rebuild_all(dev)
dt_iop_order_iccprofile_info_t * dt_ioppr_set_pipe_work_profile_info(struct dt_develop_t *dev, struct dt_dev_pixelpipe_t *pipe, const dt_colorspaces_color_profile_type_t type, const char *filename, const int intent)
dt_iop_order_iccprofile_info_t * dt_ioppr_set_pipe_input_profile_info(struct dt_develop_t *dev, struct dt_dev_pixelpipe_t *pipe, const dt_colorspaces_color_profile_type_t type, const char *filename, const int intent, const dt_colormatrix_t matrix_in)
@ DT_DEV_PIXELPIPE_DISPLAY_MASK
void dt_loc_get_datadir(char *datadir, size_t bufsize)
void dt_loc_get_user_config_dir(char *configdir, size_t bufsize)
dt_image_t * dt_image_cache_get(const int32_t imgid, char mode)
void dt_image_cache_read_release(const dt_image_t *img)
static void dt_iop_image_copy_by_size(float *const __restrict__ out, const float *const __restrict__ in, const size_t width, const size_t height, const size_t ch)
struct dt_colorspaces_color_profile_t * dt_image_get_input_profile(const int32_t imgid, const dt_colorspaces_color_profile_type_t requested, const char *camera_makermodel, dt_colorspaces_color_profile_type_t *resolved)
Resolve an image's own input profile into an opaque container, whatever kind it is.
dt_colorspaces_color_profile_type_t dt_image_find_best_color_profile(int32_t imgid, cmsHPROFILE *output, gboolean *new_profile)
Best effort to find a suitable (input) color profile for a given image, using embedded ICC or EXIF wh...
const char ** dt_iop_set_description(dt_iop_module_t *module, const char *main_text, const char *purpose, const char *input, const char *process, const char *output)
void dt_iop_request_focus(dt_iop_module_t *module)
Move darkroom focus to module, or clear it with NULL.
#define dt_iop_fmt_log(module, fmt,...)
Debug helper to trace a module's input-format-driven decisions on the -d pipe channel (DT_DEBUG_PIPE)...
GtkWidget * dt_bauhaus_combobox_from_params(dt_iop_module_t *self, const char *param)
static dt_iop_gui_data_t * dt_iop_gui_data(const struct dt_iop_module_t *m)
The module's GUI data blob, NULL-safe for headless callers: IOP process() implementations read it for...
#define IOP_GUI_ALLOC(module)
static float kernel(const float *x, const float *y)
_lib_location_type_t type
void dt_print(dt_debug_thread_t thread, const char *msg,...) __attribute__((format(printf
Print to stdout when thread is enabled, prefixed with seconds since startup.
float *const restrict const size_t k
#define IS_NULL_PTR(p)
C is way too permissive with !=, == and if(var) checks, which can mean too many things depending on w...
float DT_ALIGNED_ARRAY dt_colormatrix_t[4][4]
static void pack_3xSSE_to_3x4(const dt_colormatrix_t input, float output[12])
#define dt_free_align(ptr)
Release memory from dt_alloc_align() and set ptr to NULL.
static void * dt_calloc_align(size_t size)
dt_alloc_align() followed by a zero fill.
static void dt_free_gpointer(gpointer ptr)
g_free() one pointer, with the signature GDestroyNotify wants.
#define dt_free(ptr)
g_free() ptr and set it to NULL, skipping both if it is already NULL.
#define DT_MODULE_INTROSPECTION(MODVER, PARAMSTYPE)
DT_MODULE() for a module whose params struct is introspected.
int dt_opencl_enqueue_kernel_2d(const int dev, const int kernel, const size_t *sizes)
int dt_opencl_create_kernel(const int prog, const char *name)
void * dt_opencl_copy_host_to_device_constant(const int devid, const size_t size, void *host)
int dt_opencl_enqueue_copy_image(const int devid, cl_mem src, cl_mem dst, size_t *orig_src, size_t *orig_dst, size_t *region)
void dt_opencl_free_kernel(const int kernel)
int dt_opencl_set_kernel_arg(const int dev, const int kernel, const int num, const size_t size, const void *arg)
void * dt_opencl_copy_host_to_device(const int devid, void *host, const int width, const int height, const int bpp)
void dt_opencl_release_mem_object(cl_mem mem)
#define DT_PATH_MAX
Buffer size for a filesystem path anywhere in Ansel.
dt_iop_color_intent_t
ICC rendering intent, as stored in iop params and in conf.
#define DT_IOP_COLOR_ICC_LEN
Size of every ICC filename buffer that crosses a module boundary.
dt_colorspaces_color_profile_type_t
@ DT_COLORSPACE_EMBEDDED_MATRIX
@ DT_COLORSPACE_EMBEDDED_ICC
Image-derived profiles: enum 9..14, NOT registered in the list.
@ DT_COLORSPACE_FILE
A user ICC file on disk; the only type whose filename is meaningful.
@ DT_COLORSPACE_SRGB
sRGB – registered TWICE, and the two entries are not interchangeable.
@ DT_COLORSPACE_NONE
No profile / "take it from the image settings". Never matches a list entry.
@ DT_COLORSPACE_ENHANCED_MATRIX
@ DT_COLORSPACE_LIN_REC2020
@ DT_COLORSPACE_STANDARD_MATRIX
@ DT_COLORSPACE_VENDOR_MATRIX
@ DT_COLORSPACE_LIN_REC709
@ DT_COLORSPACE_ALTERNATE_MATRIX
@ DT_COLORSPACES_PROFILE_TYPE_INPUT
@ DT_COLORSPACES_PROFILE_TYPE_WORK
@ DT_PROFILE_ROLE_INPUT
Listed in the input-profile combo (colorin).
@ DT_PROFILE_ROLE_WORKING
Listed in the working-profile combo (colorin).
static gboolean dt_colorspaces_is_raw_matrix_profile_type(const dt_colorspaces_color_profile_type_t type)
Is this one of the four camera-matrix profile kinds?
#define DT_DEBUG_CONTROL_SIGNAL_RAISE(ctlsig, signal,...)
struct dt_control_signal_t * dt_control_signal_get_global(void)
@ DT_SIGNAL_CONTROL_PROFILE_USER_CHANGED
This signal is raised when a profile is changed by the user 1 uint32_t : the profile type that has ch...
A profile's public identity: what the GUI displays and stores, and nothing else.
dt_colorspaces_color_profile_type_t type
what to store in params / conf
char name[512]
translated, display-ready
char filename[DT_IOP_COLOR_ICC_LEN]
"" unless type == DT_COLORSPACE_FILE
One registered profile: its identity, its LCMS handle, and where it sits in each combo box.
dt_colorspaces_color_profile_type_t type
filename is only used for type DT_COLORSPACE_FILE
One end of a conversion: a profile, named either by identity or by handing over one this module alrea...
const struct dt_colorspaces_color_profile_t * resolved
An already-resolved, image-owned profile, or NULL to resolve type / filename from the registered list...
dt_colorspaces_color_profile_type_t type
Profile identity. Ignored when resolved is set, except for tracing.
const char * filename
ICC file name, or "" / NULL for a built-in. Ignored when resolved is set.
struct dt_iop_module_t *void * data
dt_dev_pixelpipe_type_t type
struct dt_develop_t * dev
char camera_makermodel[128]
float d65_color_matrix[9]
dt_iop_buffer_type_t datatype
dt_colorspaces_conversion_t * conversion
dt_colorspaces_color_profile_type_t type
dt_colorspaces_color_profile_type_t type_work
int kernel_colorin_unbound
int kernel_colorin_clipping
GtkWidget * clipping_combobox
GtkWidget * profile_combobox
GtkWidget * work_combobox
dt_colorspaces_color_profile_type_t type
dt_iop_color_intent_t intent
dt_colorspaces_color_profile_type_t type_work
dt_iop_color_normalize_t normalize
dt_iop_color_intent_t intent
dt_iop_global_data_t * data
struct dt_iop_module_gui_t * gui
struct dt_develop_t * dev
dt_iop_global_data_t * global_data
A profile reduced to the arithmetic the pixel loop can run: two matrices and six tone-curve LUTs,...
dt_colorspaces_color_profile_type_t type
Profile identity, half of the memo key. DT_COLORSPACE_NONE means "unset" and makes every apply functi...
dt_colormatrix_t matrix_out
XYZ (D50) -> RGB, row-major; the inverse of matrix_in.
char filename[DT_IOP_COLOR_ICC_LEN]
ICC file name, the other half of the memo key; "" for every built-in. Compared with strcmp,...
dt_colormatrix_t matrix_in
RGB -> XYZ (D50), row-major. matrix_in[1][*] is the luminance row. NaN in [0][0] marks the whole prof...
Region of interest passed through the pixelpipe.
Telling the user something happened.