Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
imageio_storage_api.h
Go to the documentation of this file.
1/*
2 This file is part of darktable,
3 Copyright (C) 2016 Roman Lebedev.
4 Copyright (C) 2016-2017, 2020 Tobias Ellinghaus.
5 Copyright (C) 2019 Denis Dyakov.
6 Copyright (C) 2019 Edgardo Hoszowski.
7 Copyright (C) 2019 Philippe Weyland.
8 Copyright (C) 2020-2021 Pascal Obry.
9 Copyright (C) 2021 Diederik Ter Rahe.
10 Copyright (C) 2022 Martin Bařinka.
11 Copyright (C) 2025 Aurélien PIERRE.
12
13 darktable is free software: you can redistribute it and/or modify
14 it under the terms of the GNU Lesser General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 darktable is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 GNU Lesser General Public License for more details.
22
23 You should have received a copy of the GNU Lesser General Public License
24 along with darktable. If not, see <http://www.gnu.org/licenses/>.
25*/
26#include "common/module_api.h"
27
28#ifdef FULL_API_H
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
34#include <glib.h>
35#include <stdint.h>
36
43
44/* early definition of modules to do type checking */
45
46#pragma GCC visibility push(default)
47
48#endif // FULL_API_H
49
50/* get translated module name */
51REQUIRED(const char *, name, const struct dt_imageio_module_storage_t *self);
52/* construct widget above */
54/* destroy resources */
56/* reset options to defaults */
58/* allow the module to initialize itself */
60/* try and see if this format is supported? */
62/* get storage max supported image dimension, return 0 if no dimension restrictions exists. */
64 uint32_t *width, uint32_t *height);
65/* get storage recommended image dimension, return 0 if no recommendation exists. */
67 uint32_t *width, uint32_t *height);
68
69/* called once at the beginning (before exporting image), if implemented
70 * can change the list of exported images (including a NULL list)
71 */
72OPTIONAL(int, initialize_store, struct dt_imageio_module_storage_t *self, struct dt_imageio_module_data_t *data,
73 struct dt_imageio_module_format_t **format, struct dt_imageio_module_data_t **fdata,
74 GList **images, const gboolean high_quality);
75/* this actually does the work */
76REQUIRED(int, store, struct dt_imageio_module_storage_t *self, struct dt_imageio_module_data_t *self_data, const int32_t imgid,
77 struct dt_imageio_module_format_t *format, struct dt_imageio_module_data_t *fdata, const int num,
78 const int total, const gboolean high_quality, const gboolean export_masks,
79 const enum dt_colorspaces_color_profile_type_t icc_type, const gchar *icc_filename,
80 enum dt_iop_color_intent_t icc_intent, struct dt_export_metadata_t *metadata);
81/* called once at the end (after exporting all images), if implemented. */
83
84OPTIONAL(void *, legacy_params, struct dt_imageio_module_storage_t *self, const void *const old_params,
85 const size_t old_params_size, const int old_version, const int new_version,
86 size_t *new_size);
90REQUIRED(int, set_params, struct dt_imageio_module_storage_t *self, const void *params, const int size);
91
92OPTIONAL(void, export_dispatched, struct dt_imageio_module_storage_t *self);
93
95
96#ifdef FULL_API_H
97
98#pragma GCC visibility pop
99
100#ifdef __cplusplus
101}
102#endif
103
104#endif // FULL_API_H
105
106// clang-format off
107// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
108// vim: shiftwidth=2 expandtab tabstop=2 cindent
109// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
110// clang-format on
size_t params_size(dt_imageio_module_format_t *self)
Definition avif.c:624
void gui_reset(dt_imageio_module_format_t *self)
Definition avif.c:936
int set_params(dt_imageio_module_format_t *self, const void *params, const int size)
Definition avif.c:664
void free_params(dt_imageio_module_format_t *self, dt_imageio_module_data_t *params)
Definition avif.c:682
void init(dt_imageio_module_format_t *self)
Definition avif.c:151
void * get_params(dt_imageio_module_format_t *self)
Definition avif.c:629
int width
Definition bilateral.h:1
int height
Definition bilateral.h:1
dt_iop_color_intent_t
Definition colorspaces.h:63
dt_colorspaces_color_profile_type_t
Definition colorspaces.h:81
char * name
Definition common/metadata.c:61
char * ask_user_confirmation(dt_imageio_module_storage_t *self)
Definition disk.c:420
int store(dt_imageio_module_storage_t *self, dt_imageio_module_data_t *sdata, const int32_t imgid, dt_imageio_module_format_t *format, dt_imageio_module_data_t *fdata, const int num, const int total, const gboolean high_quality, const gboolean export_masks, dt_colorspaces_color_profile_type_t icc_type, const gchar *icc_filename, dt_iop_color_intent_t icc_intent, dt_export_metadata_t *metadata)
Definition disk.c:253
void finalize_store(dt_imageio_module_storage_t *self, dt_imageio_module_data_t *params)
Definition example.c:203
int recommended_dimension(struct dt_imageio_module_storage_t *self, dt_imageio_module_data_t *data, uint32_t *width, uint32_t *height)
Definition example.c:97
int supported(struct dt_imageio_module_storage_t *storage, struct dt_imageio_module_format_t *format)
Definition example.c:274
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)
Definition exr.cc:320
int dimension(struct dt_imageio_module_format_t *self, dt_imageio_module_data_t *data, uint32_t *width, uint32_t *height)
Definition imageio/format/pdf.c:434
static void gui_cleanup(dt_lib_import_t *d)
Definition import.c:1257
static void gui_init(dt_lib_import_t *d)
Definition import.c:939
size_t size
Definition mipmap_cache.c:3
#define REQUIRED(return_type, function_name,...)
Definition module_api.h:80
#define DEFAULT(return_type, function_name,...)
Definition module_api.h:81
#define OPTIONAL(return_type, function_name,...)
Definition module_api.h:79
Definition metadata_export.h:42
Definition imageio_module.h:81
Definition imageio_module.h:91
Definition imageio_module.h:113