![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "bauhaus/bauhaus.h"
#include "common/darktable.h"
#include "common/exif.h"
#include "common/imageio.h"
#include "common/imageio_module.h"
#include "control/conf.h"
#include "imageio/format/imageio_format_api.h"
#include <stdio.h>
#include <stdlib.h>
#include <webp/encode.h>
#include <webp/mux.h>
Data Structures | |
struct | dt_imageio_webp_t |
struct | dt_imageio_webp_gui_data_t |
Macros | |
#define | _stringify(a) #a |
#define | stringify(a) _stringify(a) |
Typedefs | |
typedef struct dt_imageio_webp_t | dt_imageio_webp_t |
typedef struct dt_imageio_webp_gui_data_t | dt_imageio_webp_gui_data_t |
Enumerations | |
enum | comp_type_t { webp_lossy = 0 , webp_lossless = 1 } |
enum | hint_t { hint_default , hint_picture , hint_photo , hint_graphic } |
Functions | |
const char * | get_error_str (int err) |
void | init (dt_imageio_module_format_t *self) |
void | cleanup (dt_imageio_module_format_t *self) |
int | write_image (dt_imageio_module_data_t *webp, const char *filename, const void *in_tmp, dt_colorspaces_color_profile_type_t over_type, const char *over_filename, void *exif, int exif_len, int32_t imgid, int num, int total, struct dt_dev_pixelpipe_t *pipe, const gboolean export_masks) |
size_t | params_size (dt_imageio_module_format_t *self) |
void * | legacy_params (dt_imageio_module_format_t *self, const void *const old_params, const size_t old_params_size, const int old_version, const int new_version, size_t *new_size) |
void * | get_params (dt_imageio_module_format_t *self) |
int | set_params (dt_imageio_module_format_t *self, const void *params, const int size) |
void | free_params (dt_imageio_module_format_t *self, dt_imageio_module_data_t *params) |
int | bpp (dt_imageio_module_data_t *p) |
int | levels (dt_imageio_module_data_t *p) |
const char * | mime (dt_imageio_module_data_t *data) |
const char * | extension (dt_imageio_module_data_t *data) |
const char * | name () |
static void | compression_changed (GtkWidget *widget, gpointer user_data) |
static void | quality_changed (GtkWidget *slider, gpointer user_data) |
static void | hint_combobox_changed (GtkWidget *widget, gpointer user_data) |
void | gui_init (dt_imageio_module_format_t *self) |
void | gui_cleanup (dt_imageio_module_format_t *self) |
void | gui_reset (dt_imageio_module_format_t *self) |
int | flags (dt_imageio_module_data_t *data) |
Variables | |
static const char *const | EncoderError [] |
#define _stringify | ( | a | ) | #a |
#define stringify | ( | a | ) | _stringify(a) |
typedef struct dt_imageio_webp_gui_data_t dt_imageio_webp_gui_data_t |
typedef struct dt_imageio_webp_t dt_imageio_webp_t |
enum comp_type_t |
enum hint_t |
int bpp | ( | dt_imageio_module_data_t * | p | ) |
void cleanup | ( | dt_imageio_module_format_t * | self | ) |
|
static |
References dt_bauhaus_combobox_get(), dt_conf_set_int(), FALSE, TRUE, and webp_lossless.
Referenced by gui_init().
const char * extension | ( | dt_imageio_module_data_t * | data | ) |
int flags | ( | dt_imageio_module_data_t * | data | ) |
References FORMAT_FLAGS_SUPPORT_XMP.
void free_params | ( | dt_imageio_module_format_t * | self, |
dt_imageio_module_data_t * | params | ||
) |
const char * get_error_str | ( | int | err | ) |
References EncoderError.
Referenced by write_image().
void * get_params | ( | dt_imageio_module_format_t * | self | ) |
void gui_cleanup | ( | dt_imageio_module_format_t * | self | ) |
References dt_imageio_module_format_t::gui_data.
void gui_init | ( | dt_imageio_module_format_t * | self | ) |
References darktable_t::bauhaus, dt_imageio_webp_gui_data_t::compression, compression_changed(), darktable, dt_bauhaus_combobox_add(), dt_bauhaus_combobox_new(), dt_bauhaus_combobox_set(), dt_bauhaus_slider_new_with_range(), dt_bauhaus_slider_set(), dt_bauhaus_slider_set_default(), dt_bauhaus_slider_set_format(), dt_bauhaus_widget_set_label(), dt_conf_get_int(), dt_confgen_get_int(), DT_DEFAULT, DT_GUI_MODULE, DT_MAX, DT_MIN, FALSE, dt_imageio_module_format_t::gui_data, dt_imageio_webp_gui_data_t::hint, hint_combobox_changed(), dt_imageio_webp_gui_data_t::quality, quality_changed(), TRUE, webp_lossless, and dt_imageio_module_format_t::widget.
void gui_reset | ( | dt_imageio_module_format_t * | self | ) |
|
static |
References dt_bauhaus_combobox_get(), and dt_conf_set_int().
Referenced by gui_init().
void init | ( | dt_imageio_module_format_t * | self | ) |
void * legacy_params | ( | dt_imageio_module_format_t * | self, |
const void *const | old_params, | ||
const size_t | old_params_size, | ||
const int | old_version, | ||
const int | new_version, | ||
size_t * | new_size | ||
) |
References dt_imageio_webp_t::comp_type, dt_imageio_webp_t::global, height, dt_imageio_module_data_t::height, dt_imageio_webp_t::hint, dt_imageio_module_data_t::max_height, dt_imageio_module_data_t::max_width, dt_imageio_webp_t::quality, dt_imageio_module_data_t::style, width, and dt_imageio_module_data_t::width.
int levels | ( | dt_imageio_module_data_t * | p | ) |
References IMAGEIO_INT8, and IMAGEIO_RGB.
const char * mime | ( | dt_imageio_module_data_t * | data | ) |
const char * name | ( | ) |
size_t params_size | ( | dt_imageio_module_format_t * | self | ) |
|
static |
References dt_bauhaus_slider_get(), and dt_conf_set_int().
Referenced by gui_init().
int set_params | ( | dt_imageio_module_format_t * | self, |
const void * | params, | ||
const int | size | ||
) |
int write_image | ( | dt_imageio_module_data_t * | webp, |
const char * | filename, | ||
const void * | in_tmp, | ||
dt_colorspaces_color_profile_type_t | over_type, | ||
const char * | over_filename, | ||
void * | exif, | ||
int | exif_len, | ||
int32_t | imgid, | ||
int | num, | ||
int | total, | ||
struct dt_dev_pixelpipe_t * | pipe, | ||
const gboolean | export_masks | ||
) |
References dt_imageio_webp_t::comp_type, dt_colorspaces_get_output_profile(), dt_exif_write_blob(), get_error_str(), dt_imageio_webp_t::global, dt_imageio_module_data_t::height, dt_imageio_webp_t::hint, dt_colorspaces_color_profile_t::profile, dt_imageio_webp_t::quality, and dt_imageio_module_data_t::width.
|
static |
Referenced by get_error_str().