blob: fce3fe7e02cc3050488134b20447b32307a19e10 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#ifndef GGAZE_ENHANCER_H
#define GGAZE_ENHANCER_H
#include <gio/gio.h>
#include <glib.h>
#include <gegl.h>
G_BEGIN_DECLS
typedef struct {
char *c_name;
char *c_graph; /* GEGL graph string (for user presets) or NULL (built-in) */
int i_builtin; /* 1 if built-in (programmatic), 0 if user (graph text) */
} EnhancerPreset;
typedef struct Enhancer Enhancer;
Enhancer *enhancer_new(void);
void enhancer_delete(Enhancer *p_e);
void enhancer_set_presets(Enhancer *p_e, const GPtrArray *p_presets);
const GPtrArray *enhancer_get_presets(Enhancer *p_e);
/* Apply a preset to a GeglBuffer (returns a new buffer, or NULL on error). */
GeglBuffer *enhancer_apply(Enhancer *p_e, GeglBuffer *p_in,
const EnhancerPreset *p_preset, GError **p_err);
/* Export the enhanced buffer to a file (JPEG quality 95, EXIF Orientation=1).
* Returns TRUE on success. */
gboolean enhancer_export(Enhancer *p_e, GeglBuffer *p_in,
const EnhancerPreset *p_preset, GFile *p_out,
GError **p_err);
G_END_DECLS
#endif
|