File: gimpimage-color-profile.h

package info (click to toggle)
gimp 3.0.4-6.2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 210,548 kB
  • sloc: ansic: 842,405; lisp: 10,761; python: 10,318; cpp: 7,238; perl: 4,355; sh: 1,043; xml: 963; yacc: 609; lex: 348; javascript: 150; makefile: 43
file content (131 lines) | stat: -rw-r--r-- 8,073 bytes parent folder | download | duplicates (2)
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
/* GIMP - The GNU Image Manipulation Program
 * Copyright (C) 1995 Spencer Kimball and Peter Mattis
 *
 * gimpimage-color-profile.h
 * Copyright (C) 2015-2018 Michael Natterer <mitch@gimp.org>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */

#ifndef __GIMP_IMAGE_COLOR_PROFILE_H__
#define __GIMP_IMAGE_COLOR_PROFILE_H__


#define GIMP_ICC_PROFILE_PARASITE_NAME            "icc-profile"
#define GIMP_SIMULATION_ICC_PROFILE_PARASITE_NAME "simulation-icc-profile"


gboolean             gimp_image_get_use_srgb_profile   (GimpImage           *image,
                                                        gboolean            *hidden_profile);
void                 gimp_image_set_use_srgb_profile   (GimpImage           *image,
                                                        gboolean             use_srgb);

GimpColorProfile   * _gimp_image_get_hidden_profile    (GimpImage           *image);
void                 _gimp_image_set_hidden_profile    (GimpImage           *image,
                                                        GimpColorProfile    *profile,
                                                        gboolean             push_undo);

gboolean             gimp_image_validate_icc_parasite  (GimpImage           *image,
                                                        const GimpParasite  *icc_parasite,
                                                        const gchar         *profile_type,
                                                        gboolean            *is_builtin,
                                                        GError             **error);
const GimpParasite * gimp_image_get_icc_parasite       (GimpImage           *image);
void                 gimp_image_set_icc_parasite       (GimpImage           *image,
                                                        const GimpParasite  *icc_parasite,
                                                        const gchar         *profile_type);

gboolean             gimp_image_validate_icc_profile   (GimpImage           *image,
                                                        const guint8        *data,
                                                        gsize                length,
                                                        const gchar         *profile_type,
                                                        gboolean            *is_builtin,
                                                        GError             **error);
const guint8       * gimp_image_get_icc_profile        (GimpImage           *image,
                                                        gsize               *length);
gboolean             gimp_image_set_icc_profile        (GimpImage           *image,
                                                        const guint8        *data,
                                                        gsize                length,
                                                        const gchar         *profile_type,
                                                        GError             **error);

gboolean             gimp_image_validate_color_profile (GimpImage           *image,
                                                        GimpColorProfile    *profile,
                                                        gboolean            *is_builtin,
                                                        GError             **error);
GimpColorProfile   * gimp_image_get_color_profile      (GimpImage           *image);
gboolean             gimp_image_set_color_profile      (GimpImage           *image,
                                                        GimpColorProfile    *profile,
                                                        GError             **error);

GimpColorProfile   * gimp_image_get_simulation_profile (GimpImage           *image);
gboolean             gimp_image_set_simulation_profile (GimpImage           *image,
                                                        GimpColorProfile    *profile);

GimpColorRenderingIntent
                     gimp_image_get_simulation_intent  (GimpImage           *image);
void                 gimp_image_set_simulation_intent  (GimpImage                *image,
                                                        GimpColorRenderingIntent intent);

gboolean             gimp_image_get_simulation_bpc     (GimpImage           *image);
void                 gimp_image_set_simulation_bpc     (GimpImage           *image,
                                                        gboolean             bpc);

gboolean             gimp_image_validate_color_profile_by_format
                                                       (const Babl          *format,
                                                        GimpColorProfile    *profile,
                                                        gboolean            *is_builtin,
                                                        GError             **error);

GimpColorProfile   * gimp_image_get_builtin_color_profile
                                                       (GimpImage           *image);

gboolean             gimp_image_assign_color_profile   (GimpImage           *image,
                                                        GimpColorProfile    *dest_profile,
                                                        GimpProgress        *progress,
                                                        GError             **error);

gboolean             gimp_image_convert_color_profile  (GimpImage           *image,
                                                        GimpColorProfile    *dest_profile,
                                                        GimpColorRenderingIntent  intent,
                                                        gboolean             bpc,
                                                        GimpProgress        *progress,
                                                        GError             **error);

void                 gimp_image_import_color_profile   (GimpImage           *image,
                                                        GimpContext         *context,
                                                        GimpProgress        *progress,
                                                        gboolean             interactive);

GimpColorTransform * gimp_image_get_color_transform_to_srgb_u8
                                                       (GimpImage           *image);

GimpColorTransform * gimp_image_get_color_transform_to_srgb_double
                                                       (GimpImage           *image);
GimpColorTransform * gimp_image_get_color_transform_from_srgb_double
                                                       (GimpImage           *image);


/*  internal API, to be called only from gimpimage.c  */

void                 _gimp_image_free_color_profile    (GimpImage           *image);
void                 _gimp_image_free_color_transforms (GimpImage           *image);
void                 _gimp_image_update_color_profile  (GimpImage           *image,
                                                        const GimpParasite  *icc_parasite);
void                 _gimp_image_update_simulation_profile
                                                       (GimpImage           *image,
                                                        const GimpParasite  *icc_parasite);


#endif /* __GIMP_IMAGE_COLOR_PROFILE_H__ */