77 return _(
"this module is deprecated. please use the vibrance slider in the color balance rgb module instead.");
87 return _(
"saturation");
109 "to make the colors more vivid."),
111 _(
"linear or non-linear, Lab, display-referred"),
112 _(
"non-linear, Lab"),
113 _(
"non-linear, Lab, display-referred"));
123 const float *
const restrict in = (
float *)ivoid;
124 float *
const restrict
out = (
float *)
ovoid;
126 const float amount = (
d->amount * 0.01);
127 const int npixels = roi_out->
height * roi_out->
width;
129 for(
int k = 0;
k < 4 * npixels;
k += 4)
132 const float sw = sqrtf((in[
k + 1] * in[
k + 1]) + (in[
k + 2] * in[
k + 2])) / 256.0f;
133 const float ls = 1.0f - ((amount * sw) * .25f);
134 const float ss = 1.0f + (amount * sw);
137 for (
int c = 0; c < 4; c++)
139 out[
k + c] = in[
k + c] * weights[c];
150 d->amount =
p->amount;
178 gtk_widget_set_tooltip_text(
g->amount_scale, _(
"the amount of vibrance"));
void dt_bauhaus_slider_set(GtkWidget *widget, float pos)
void dt_bauhaus_slider_set_format(GtkWidget *widget, const char *format)
struct _GtkWidget GtkWidget
GtkWidget, opaque, spelled exactly as GTK spells it.
const dt_colormatrix_t dt_aligned_pixel_t out
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)
@ IOP_FLAGS_INCLUDE_IN_STYLES
@ IOP_FLAGS_SUPPORTS_BLENDING
GtkWidget * dt_bauhaus_slider_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)
float *const restrict const size_t k
#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.
#define DT_MODULE_INTROSPECTION(MODVER, PARAMSTYPE)
DT_MODULE() for a module whose params struct is introspected.
#define __OMP_SIMD__(...)
#define __OMP_PARALLEL_FOR__(...)
DT_ALIGNED_PIXEL float dt_aligned_pixel_t[4]
struct dt_iop_module_t *void * data
Region of interest passed through the pixelpipe.
#define __DT_CLONE_TARGETS__
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)
__DT_CLONE_TARGETS__ 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 init_pipe(struct dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
void gui_update(struct dt_iop_module_t *self)
Refresh GUI controls from current params and configuration.
void gui_init(struct 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 cleanup_pipe(struct dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
const char * deprecated_msg()