![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "bauhaus/bauhaus.h"#include "common/colorspaces.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 <inttypes.h>#include <setjmp.h>#include <stdio.h>#include <stdlib.h>#include <jpeglib.h>
Include dependency graph for jpeg.c:Data Structures | |
| struct | dt_imageio_jpeg_t |
| struct | dt_imageio_jpeg_gui_data_t |
| struct | dt_imageio_jpeg_error_mgr |
Macros | |
| #define | ICC_MARKER (JPEG_APP0 + 2) /* JPEG marker code for ICC */ |
| #define | ICC_OVERHEAD_LEN 14 /* size of non-profile data in APP2 */ |
| #define | MAX_BYTES_IN_MARKER 65533 /* maximum data len of a JPEG marker */ |
| #define | MAX_DATA_BYTES_IN_MARKER (MAX_BYTES_IN_MARKER - ICC_OVERHEAD_LEN) |
Typedefs | |
| typedef struct dt_imageio_jpeg_t | dt_imageio_jpeg_t |
| typedef struct dt_imageio_jpeg_gui_data_t | dt_imageio_jpeg_gui_data_t |
| typedef struct dt_imageio_jpeg_error_mgr * | dt_imageio_jpeg_error_ptr |
Functions | |
| static void | dt_imageio_jpeg_error_exit (j_common_ptr cinfo) |
| static void | write_icc_profile (j_compress_ptr cinfo, const JOCTET *icc_data_ptr, unsigned int icc_data_len) |
| int | write_image (dt_imageio_module_data_t *jpg_tmp, 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) |
| static int | __attribute__ ((__unused__)) |
| int | read_image (dt_imageio_module_data_t *jpg_tmp, uint8_t *out) |
| 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) |
| void | free_params (dt_imageio_module_format_t *self, dt_imageio_module_data_t *params) |
| int | set_params (dt_imageio_module_format_t *self, const void *params, const int size) |
| 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) |
| int | flags (dt_imageio_module_data_t *data) |
| void | init (dt_imageio_module_format_t *self) |
| void | cleanup (dt_imageio_module_format_t *self) |
| const char * | name () |
| static void | quality_changed (GtkWidget *slider, 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) |
Variables | |
| struct dt_imageio_jpeg_error_mgr | dt_imageio_jpeg_error_mgr |
| #define ICC_MARKER (JPEG_APP0 + 2) /* JPEG marker code for ICC */ |
| #define ICC_OVERHEAD_LEN 14 /* size of non-profile data in APP2 */ |
| #define MAX_BYTES_IN_MARKER 65533 /* maximum data len of a JPEG marker */ |
| #define MAX_DATA_BYTES_IN_MARKER (MAX_BYTES_IN_MARKER - ICC_OVERHEAD_LEN) |
| typedef struct dt_imageio_jpeg_error_mgr* dt_imageio_jpeg_error_ptr |
| typedef struct dt_imageio_jpeg_gui_data_t dt_imageio_jpeg_gui_data_t |
| typedef struct dt_imageio_jpeg_t dt_imageio_jpeg_t |
|
static |
| int bpp | ( | dt_imageio_module_data_t * | p | ) |
| void cleanup | ( | dt_imageio_module_format_t * | self | ) |
|
static |
References dt_imageio_jpeg_error_mgr::setjmp_buffer.
Referenced by __attribute__(), read_image(), and write_image().
| 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 | ||
| ) |
| void * get_params | ( | dt_imageio_module_format_t * | self | ) |
References dt_conf_get_int(), and dt_imageio_jpeg_t::quality.
| 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, darktable, dt_bauhaus_slider_new_with_range(), dt_bauhaus_slider_set(), dt_bauhaus_slider_set_default(), dt_bauhaus_widget_set_label(), dt_conf_get_int(), dt_confgen_get_int(), DT_DEFAULT, DT_GUI_MODULE, DT_MAX, DT_MIN, dt_imageio_module_format_t::gui_data, quality_changed(), TRUE, and dt_imageio_module_format_t::widget.
| void gui_reset | ( | dt_imageio_module_format_t * | self | ) |
| void init | ( | dt_imageio_module_format_t * | self | ) |
References darktable, dt_lua_register_module_member, and darktable_t::lua_state.
| 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_jpeg_t::cinfo, dt_imageio_jpeg_t::dest, dt_imageio_jpeg_t::dinfo, dt_imageio_jpeg_t::f, f(), dt_imageio_jpeg_t::global, height, dt_imageio_module_data_t::height, dt_imageio_module_data_t::max_height, dt_imageio_module_data_t::max_width, dt_imageio_jpeg_t::quality, dt_imageio_jpeg_t::src, 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 read_image | ( | dt_imageio_module_data_t * | jpg_tmp, |
| uint8_t * | out | ||
| ) |
| int set_params | ( | dt_imageio_module_format_t * | self, |
| const void * | params, | ||
| const int | size | ||
| ) |
|
static |
References ICC_MARKER, ICC_OVERHEAD_LEN, and MAX_DATA_BYTES_IN_MARKER.
Referenced by write_image().
| int write_image | ( | dt_imageio_module_data_t * | jpg_tmp, |
| 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_jpeg_t::cinfo, dt_alloc_align, dt_colorspaces_get_output_profile(), dt_conf_get_int(), dt_exif_write_blob(), dt_free_align, dt_imageio_jpeg_error_exit(), f(), dt_imageio_jpeg_t::global, dt_imageio_module_data_t::height, dt_colorspaces_color_profile_t::profile, dt_imageio_jpeg_error_mgr::pub, dt_imageio_jpeg_t::quality, dt_imageio_jpeg_error_mgr::setjmp_buffer, TRUE, dt_imageio_module_data_t::width, and write_icc_profile().