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-2021 darktable developers.
4
5 darktable is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 darktable is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public License
16 along with darktable. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#include "common/module_api.h"
20
21#ifdef FULL_API_H
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27#include <glib.h>
28#include <stdint.h>
29
36
37/* early definition of modules to do type checking */
38
39#pragma GCC visibility push(default)
40
41#endif // FULL_API_H
42
43/* get translated module name */
44REQUIRED(const char *, name, const struct dt_imageio_module_storage_t *self);
45/* construct widget above */
47/* destroy resources */
49/* reset options to defaults */
51/* allow the module to initialize itself */
53/* try and see if this format is supported? */
55/* get storage max supported image dimension, return 0 if no dimension restrictions exists. */
57 uint32_t *width, uint32_t *height);
58/* get storage recommended image dimension, return 0 if no recommendation exists. */
60 uint32_t *width, uint32_t *height);
61
62/* called once at the beginning (before exporting image), if implemented
63 * can change the list of exported images (including a NULL list)
64 */
65OPTIONAL(int, initialize_store, struct dt_imageio_module_storage_t *self, struct dt_imageio_module_data_t *data,
66 struct dt_imageio_module_format_t **format, struct dt_imageio_module_data_t **fdata,
67 GList **images, const gboolean high_quality);
68/* this actually does the work */
69REQUIRED(int, store, struct dt_imageio_module_storage_t *self, struct dt_imageio_module_data_t *self_data, const int32_t imgid,
70 struct dt_imageio_module_format_t *format, struct dt_imageio_module_data_t *fdata, const int num,
71 const int total, const gboolean high_quality, const gboolean export_masks,
72 const enum dt_colorspaces_color_profile_type_t icc_type, const gchar *icc_filename,
73 enum dt_iop_color_intent_t icc_intent, struct dt_export_metadata_t *metadata);
74/* called once at the end (after exporting all images), if implemented. */
76
77OPTIONAL(void *, legacy_params, struct dt_imageio_module_storage_t *self, const void *const old_params,
78 const size_t old_params_size, const int old_version, const int new_version,
79 size_t *new_size);
83REQUIRED(int, set_params, struct dt_imageio_module_storage_t *self, const void *params, const int size);
84
85OPTIONAL(void, export_dispatched, struct dt_imageio_module_storage_t *self);
86
88
89#ifdef FULL_API_H
90
91#pragma GCC visibility pop
92
93#ifdef __cplusplus
94}
95#endif
96
97#endif // FULL_API_H
98
99// clang-format off
100// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
101// vim: shiftwidth=2 expandtab tabstop=2 cindent
102// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
103// clang-format on
size_t params_size(dt_imageio_module_format_t *self)
Definition avif.c:615
void gui_reset(dt_imageio_module_format_t *self)
Definition avif.c:927
int set_params(dt_imageio_module_format_t *self, const void *params, const int size)
Definition avif.c:655
void free_params(dt_imageio_module_format_t *self, dt_imageio_module_data_t *params)
Definition avif.c:673
void init(dt_imageio_module_format_t *self)
Definition avif.c:142
void * get_params(dt_imageio_module_format_t *self)
Definition avif.c:620
int width
Definition bilateral.h:1
int height
Definition bilateral.h:1
dt_iop_color_intent_t
Definition colorspaces.h:43
dt_colorspaces_color_profile_type_t
Definition colorspaces.h:61
char * name
Definition common/metadata.c:41
char * ask_user_confirmation(dt_imageio_module_storage_t *self)
Definition disk.c:388
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:221
void finalize_store(dt_imageio_module_storage_t *self, dt_imageio_module_data_t *params)
Definition example.c:184
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:78
int supported(struct dt_imageio_module_storage_t *storage, struct dt_imageio_module_format_t *format)
Definition example.c:255
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:300
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:416
static void gui_cleanup(dt_lib_import_t *d)
Definition import.c:1243
static void gui_init(dt_lib_import_t *d)
Definition import.c:926
size_t size
Definition mipmap_cache.c:3
#define REQUIRED(return_type, function_name,...)
Definition module_api.h:74
#define DEFAULT(return_type, function_name,...)
Definition module_api.h:75
#define OPTIONAL(return_type, function_name,...)
Definition module_api.h:73
Definition metadata_export.h:35
Definition imageio_module.h:62
Definition imageio_module.h:72
Definition imageio_module.h:94