Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
imageio_module.h
Go to the documentation of this file.
1/*
2 This file is part of darktable,
3 Copyright (C) 2010-2011 Henrik Andersson.
4 Copyright (C) 2010-2011 johannes hanika.
5 Copyright (C) 2012, 2014, 2020-2021 Pascal Obry.
6 Copyright (C) 2012 Richard Wonka.
7 Copyright (C) 2012 Simon Spannagel.
8 Copyright (C) 2012, 2014-2017, 2019-2020 Tobias Ellinghaus.
9 Copyright (C) 2013-2015 Jérémy Rosen.
10 Copyright (C) 2013 Ulrich Pegelow.
11 Copyright (C) 2016 Roman Lebedev.
12 Copyright (C) 2017 luzpaz.
13 Copyright (C) 2019 Denis Dyakov.
14 Copyright (C) 2019 Edgardo Hoszowski.
15 Copyright (C) 2019 Philippe Weyland.
16 Copyright (C) 2020 a.
17 Copyright (C) 2020 Andreas Schneider.
18 Copyright (C) 2021 Bill Ferguson.
19 Copyright (C) 2021 Diederik Ter Rahe.
20 Copyright (C) 2022 Martin Bařinka.
21 Copyright (C) 2025 Alynx Zhou.
22 Copyright (C) 2025 Aurélien PIERRE.
23
24 darktable is free software: you can redistribute it and/or modify
25 it under the terms of the GNU General Public License as published by
26 the Free Software Foundation, either version 3 of the License, or
27 (at your option) any later version.
28
29 darktable is distributed in the hope that it will be useful,
30 but WITHOUT ANY WARRANTY; without even the implied warranty of
31 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32 GNU General Public License for more details.
33
34 You should have received a copy of the GNU General Public License
35 along with darktable. If not, see <http://www.gnu.org/licenses/>.
36*/
37
38#pragma once
39
40#include "common/colorspaces.h"
41#include "common/darktable.h"
43#include <gmodule.h>
44#include <gtk/gtk.h>
45#include <inttypes.h>
46#ifdef USE_LUA
47#include "lua/call.h"
48#include "lua/events.h"
49#include "lua/format.h"
50#include "lua/modules.h"
51#include "lua/storage.h"
52#include "lua/types.h"
53#endif
54
55#ifdef __cplusplus
56extern "C" {
57#endif
58
66
75/*
76 * custom data for the module. append private stuff after these.
77 * this will be inited once when the export button is hit, so the user can make
78 * gui adjustments that won't affect the currently running export.
79 */
86
89/* responsible for image encoding, such as jpg,png,etc */
91{
92#define INCLUDE_API_FROM_MODULE_H
94
95 // office use only:
96 char plugin_name[128];
97 GModule *module;
98
99 // gui stuff:
101
102 // data for you to initialize
103 void *gui_data;
104
106
107 gboolean ready;
109
110
111/* responsible for image storage, such as flickr, harddisk, etc */
113{
114#define INCLUDE_API_FROM_MODULE_H
116
117 // office use only:
118 char plugin_name[128];
119 GModule *module;
120
121 // gui stuff:
123
124 // data for you to initialize
125 void *gui_data;
126
129
130
131/* main struct */
137
138/* load all modules */
140/* cleanup */
142
143/* get selected imageio plugin for export */
145
146/* get selected imageio plugin for export */
148
149/* get by name. */
152
153/* get by index */
158
159/* add a module into the known module list */
161/* remove a module from the known module list */
163
164// This function returns value of string which stored in the
165// "plugins/lighttable/export/resizing_factor" parameter of the configuration file
166// and its "num" and "denum" fraction's elements to calculate the scaling factor
167// and improve the readability of the displayed string itself in the "scale" field
168// of the settings export.
169gchar *dt_imageio_resizing_factor_get_and_parsing(double *num, double *denum);
170
171#ifdef __cplusplus
172}
173#endif
174
175// clang-format off
176// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
177// vim: shiftwidth=2 expandtab tabstop=2 cindent
178// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
179// clang-format on
char * name
Definition common/metadata.c:61
dt_imageio_module_storage_t * dt_imageio_get_storage_by_index(int index)
Definition imageio_module.c:361
void dt_imageio_cleanup(dt_imageio_t *iio)
Definition imageio_module.c:282
void dt_imageio_remove_storage(dt_imageio_module_storage_t *storage)
Definition imageio_module.c:387
dt_imageio_module_storage_t * dt_imageio_get_storage()
Definition imageio_module.c:317
int dt_imageio_get_index_of_format(dt_imageio_module_format_t *format)
Definition imageio_module.c:369
dt_imageio_format_flags_t
Definition imageio_module.h:61
@ FORMAT_FLAGS_SUPPORT_LAYERS
Definition imageio_module.h:64
@ FORMAT_FLAGS_SUPPORT_XMP
Definition imageio_module.h:62
@ FORMAT_FLAGS_NO_TMPFILE
Definition imageio_module.h:63
int dt_imageio_get_index_of_storage(dt_imageio_module_storage_t *storage)
Definition imageio_module.c:374
dt_imageio_module_format_t * dt_imageio_get_format_by_index(int index)
Definition imageio_module.c:353
gchar * dt_imageio_resizing_factor_get_and_parsing(double *num, double *denum)
Definition imageio_module.c:393
dt_imageio_module_format_t * dt_imageio_get_format()
Definition imageio_module.c:305
void dt_imageio_init(dt_imageio_t *iio)
Definition imageio_module.c:273
void dt_imageio_insert_storage(dt_imageio_module_storage_t *storage)
Definition imageio_module.c:380
dt_imageio_module_format_t * dt_imageio_get_format_by_name(const char *name)
Definition imageio_module.c:329
dt_imageio_module_storage_t * dt_imageio_get_storage_by_name(const char *name)
Definition imageio_module.c:341
int luaA_Type
Definition lua.h:97
struct _GtkWidget GtkWidget
Definition splash.h:29
Definition pixelpipe_hb.h:216
Definition imageio_module.h:81
int width
Definition imageio_module.h:83
char style[128]
Definition imageio_module.h:84
int max_width
Definition imageio_module.h:82
int max_height
Definition imageio_module.h:82
int height
Definition imageio_module.h:83
Definition imageio_module.h:91
gboolean ready
Definition imageio_module.h:107
GModule *GtkWidget * widget
Definition imageio_module.h:100
luaA_Type parameter_lua_type
Definition imageio_module.h:105
char plugin_name[128]
Definition imageio_module.h:96
void * gui_data
Definition imageio_module.h:103
Definition imageio_module.h:113
char plugin_name[128]
Definition imageio_module.h:118
void * gui_data
Definition imageio_module.h:125
luaA_Type parameter_lua_type
Definition imageio_module.h:127
GModule *GtkWidget * widget
Definition imageio_module.h:122
Definition imageio_module.h:133
GList * plugins_storage
Definition imageio_module.h:135
GList * plugins_format
Definition imageio_module.h:134