Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
monochrome.c File Reference
#include "bauhaus/bauhaus.h"
#include "common/bilateral.h"
#include "common/bilateralcl.h"
#include "common/colorspaces.h"
#include "common/math.h"
#include "common/opencl.h"
#include "control/control.h"
#include "develop/develop.h"
#include "develop/imageop.h"
#include "develop/imageop_gui.h"
#include "develop/tiling.h"
#include "dtgtk/drawingarea.h"
#include "gui/color_picker_proxy.h"
#include "gui/gtk.h"
#include "gui/presets.h"
#include "iop/iop_api.h"
#include <assert.h>
#include <stdlib.h>
#include <string.h>
+ Include dependency graph for monochrome.c:

Data Structures

struct  dt_iop_monochrome_params_t
 
struct  dt_iop_monochrome_data_t
 
struct  dt_iop_monochrome_gui_data_t
 

Macros

#define DT_COLORCORRECTION_INSET   DT_PIXEL_APPLY_DPI(5)
 
#define DT_COLORCORRECTION_MAX   40.
 
#define PANEL_WIDTH   256.0f
 

Typedefs

typedef struct dt_iop_monochrome_params_t dt_iop_monochrome_params_t
 
typedef struct dt_iop_monochrome_data_t dt_iop_monochrome_data_t
 
typedef struct dt_iop_monochrome_gui_data_t dt_iop_monochrome_gui_data_t
 

Functions

const char * name ()
 
int default_group ()
 
int flags ()
 
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)
 
const char ** description (struct dt_iop_module_t *self)
 
int legacy_params (dt_iop_module_t *self, const void *const old_params, const int old_version, void *new_params, const int new_version)
 
void init_presets (dt_iop_module_so_t *self)
 
static float color_filter (const float ai, const float bi, const float a, const float b, const float size)
 
static float envelope (const float L)
 
int process (struct dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, const void *const i, void *const o)
 
void tiling_callback (struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, const struct dt_dev_pixelpipe_iop_t *piece, struct dt_develop_tiling_t *tiling)
 
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)
 
void gui_update (struct dt_iop_module_t *self)
 Refresh GUI controls from current params and configuration.
 
void init_pipe (struct dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, 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)
 
static gboolean dt_iop_monochrome_draw (GtkWidget *widget, cairo_t *crf, gpointer user_data)
 
void color_picker_apply (dt_iop_module_t *self, GtkWidget *picker, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
 
static gboolean dt_iop_monochrome_motion_notify (GtkWidget *widget, GdkEventMotion *event, gpointer user_data)
 
static gboolean dt_iop_monochrome_button_press (GtkWidget *widget, GdkEventButton *event, gpointer user_data)
 
static gboolean dt_iop_monochrome_button_release (GtkWidget *widget, GdkEventButton *event, gpointer user_data)
 
static gboolean dt_iop_monochrome_leave_notify (GtkWidget *widget, GdkEventCrossing *event, gpointer user_data)
 
static gboolean dt_iop_monochrome_scrolled (GtkWidget *widget, GdkEventScroll *event, gpointer user_data)
 
void gui_init (struct dt_iop_module_t *self)
 
void gui_cleanup (struct dt_iop_module_t *self)
 

Macro Definition Documentation

◆ DT_COLORCORRECTION_INSET

#define DT_COLORCORRECTION_INSET   DT_PIXEL_APPLY_DPI(5)

◆ DT_COLORCORRECTION_MAX

#define DT_COLORCORRECTION_MAX   40.

◆ PANEL_WIDTH

#define PANEL_WIDTH   256.0f

Typedef Documentation

◆ dt_iop_monochrome_data_t

◆ dt_iop_monochrome_gui_data_t

◆ dt_iop_monochrome_params_t

Function Documentation

◆ cleanup_pipe()

void cleanup_pipe ( struct dt_iop_module_t self,
dt_dev_pixelpipe_t pipe,
dt_dev_pixelpipe_iop_t piece 
)

◆ color_filter()

static float color_filter ( const float  ai,
const float  bi,
const float  a,
const float  b,
const float  size 
)
static

References a, b, CLAMPS, dt_fast_expf(), and size.

Referenced by dt_iop_monochrome_draw(), and process().

◆ color_picker_apply()

◆ commit_params()

◆ default_colorspace()

int default_colorspace ( dt_iop_module_t self,
dt_dev_pixelpipe_t pipe,
const dt_dev_pixelpipe_iop_t piece 
)

References IOP_CS_LAB.

◆ default_group()

int default_group ( )

References IOP_GROUP_EFFECTS.

◆ description()

const char ** description ( struct dt_iop_module_t self)

◆ dt_iop_monochrome_button_press()

◆ dt_iop_monochrome_button_release()

static gboolean dt_iop_monochrome_button_release ( GtkWidget widget,
GdkEventButton *  event,
gpointer  user_data 
)
static

◆ dt_iop_monochrome_draw()

static gboolean dt_iop_monochrome_draw ( GtkWidget widget,
cairo_t *  crf,
gpointer  user_data 
)
static

◆ dt_iop_monochrome_leave_notify()

static gboolean dt_iop_monochrome_leave_notify ( GtkWidget widget,
GdkEventCrossing *  event,
gpointer  user_data 
)
static

◆ dt_iop_monochrome_motion_notify()

static gboolean dt_iop_monochrome_motion_notify ( GtkWidget widget,
GdkEventMotion *  event,
gpointer  user_data 
)
static

◆ dt_iop_monochrome_scrolled()

static gboolean dt_iop_monochrome_scrolled ( GtkWidget widget,
GdkEventScroll *  event,
gpointer  user_data 
)
static

◆ envelope()

static float envelope ( const float  L)
static

References CLAMPS, L, and x.

Referenced by process().

◆ flags()

◆ gui_cleanup()

void gui_cleanup ( struct dt_iop_module_t self)

◆ gui_init()

◆ gui_update()

void gui_update ( struct dt_iop_module_t self)

Refresh GUI controls from current params and configuration.

Todo:
check why needed
Todo:
by hand

References FALSE, g, and dt_iop_module_t::gui_data.

◆ init_pipe()

◆ init_presets()

◆ input_format()

◆ legacy_params()

int legacy_params ( dt_iop_module_t self,
const void *const  old_params,
const int  old_version,
void new_params,
const int  new_version 
)

◆ name()

const char * name ( )

◆ process()

◆ tiling_callback()

void tiling_callback ( struct dt_iop_module_t self,
const struct dt_dev_pixelpipe_t pipe,
const struct dt_dev_pixelpipe_iop_t piece,
struct dt_develop_tiling_t tiling 
)