Debian Codegraph @

src/main/color-conversion.h

raw symbols SCIP
1 /*
2 *
3 * Gutenprint color management module - traditional Gimp-Print algorithm.
4 *
5 * Copyright 1997-2000 Michael Sweet ([email protected]) and
6 * Robert Krawitz ([email protected])
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the Free
10 * Software Foundation; either version 2 of the License, or (at your option)
11 * any later version.
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 * for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <https://www.gnu.org/licenses/>.
20 */
21
22 #ifndef GUTENPRINT_INTERNAL_COLOR_CONVERSION_H
23 #define GUTENPRINT_INTERNAL_COLOR_CONVERSION_Hcxx . . $ `src/main/color-conversion.h:23:9`!
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28
29 #ifdef HAVE_CONFIG_Hcxx . . $ `<built-in>:409:9`!
30 #include <config.h>cxx . . $ `<file>/config.h`/
31 #endif
32 #include <gutenprint/gutenprint.h>cxx . . $ `<file>/include/gutenprint/gutenprint.h`/
33 #include <gutenprint/curve-cache.h>cxx . . $ `<file>/include/gutenprint/curve-cache.h`/
34
35 typedef enumcxx . . $ $anonymous_type_b1e744064c9709f4_0#
36 {
37 COLOR_CORRECTION_DEFAULTcxx . . $ COLOR_CORRECTION_DEFAULT.,
38 COLOR_CORRECTION_UNCORRECTEDcxx . . $ COLOR_CORRECTION_UNCORRECTED.,
39 COLOR_CORRECTION_BRIGHTcxx . . $ COLOR_CORRECTION_BRIGHT.,
40 COLOR_CORRECTION_HUEcxx . . $ COLOR_CORRECTION_HUE.,
41 COLOR_CORRECTION_ACCURATEcxx . . $ COLOR_CORRECTION_ACCURATE.,
42 COLOR_CORRECTION_THRESHOLDcxx . . $ COLOR_CORRECTION_THRESHOLD.,
43 COLOR_CORRECTION_DESATURATEDcxx . . $ COLOR_CORRECTION_DESATURATED.,
44 COLOR_CORRECTION_DENSITYcxx . . $ COLOR_CORRECTION_DENSITY.,
45 COLOR_CORRECTION_RAWcxx . . $ COLOR_CORRECTION_RAW.,
46 COLOR_CORRECTION_PREDITHEREDcxx . . $ COLOR_CORRECTION_PREDITHERED.
47 } color_correction_enum_tcxx . . $ color_correction_enum_t#;
48
49 typedef structcxx . . $ $anonymous_type_b1e744064c9709f4_1#
50 {
51 const char *namecxx . . $ $anonymous_type_b1e744064c9709f4_1#name.;
52 const char *textcxx . . $ $anonymous_type_b1e744064c9709f4_1#text.;
53 color_correction_enum_tcxx . . $ color_correction_enum_t# correctioncxx . . $ $anonymous_type_b1e744064c9709f4_1#correction.;
54 int correct_hslcxx . . $ $anonymous_type_b1e744064c9709f4_1#correct_hsl.;
55 } color_correction_tcxx . . $ color_correction_t#;
56
57 typedef enumcxx . . $ $anonymous_type_b1e744064c9709f4_2#
58 {
59 COLOR_WHITEcxx . . $ COLOR_WHITE., /* RGB */
60 COLOR_BLACKcxx . . $ COLOR_BLACK., /* CMY */
61 COLOR_UNKNOWNcxx . . $ COLOR_UNKNOWN. /* Printer-specific uninterpreted */
62 } color_model_tcxx . . $ color_model_t#;
63
64 #define CHANNEL_Kcxx . . $ `src/main/color-conversion.h:64:9`! 0
65 #define CHANNEL_Ccxx . . $ `src/main/color-conversion.h:65:9`! 1
66 #define CHANNEL_Mcxx . . $ `src/main/color-conversion.h:66:9`! 2
67 #define CHANNEL_Ycxx . . $ `src/main/color-conversion.h:67:9`! 3
68 #define CHANNEL_Wcxx . . $ `src/main/color-conversion.h:68:9`! 4
69 #define CHANNEL_Rcxx . . $ `src/main/color-conversion.h:69:9`! 5
70 #define CHANNEL_Gcxx . . $ `src/main/color-conversion.h:70:9`! 6
71 #define CHANNEL_Bcxx . . $ `src/main/color-conversion.h:71:9`! 7
72 #define CHANNEL_MAXcxx . . $ `src/main/color-conversion.h:72:9`! 8
73
74 #define CMASK_Kcxx . . $ `src/main/color-conversion.h:74:9`! (1 << CHANNEL_K)
75 #define CMASK_Ccxx . . $ `src/main/color-conversion.h:75:9`! (1 << CHANNEL_C)
76 #define CMASK_Mcxx . . $ `src/main/color-conversion.h:76:9`! (1 << CHANNEL_M)
77 #define CMASK_Ycxx . . $ `src/main/color-conversion.h:77:9`! (1 << CHANNEL_Y)
78 #define CMASK_Wcxx . . $ `src/main/color-conversion.h:78:9`! (1 << CHANNEL_W)
79 #define CMASK_Rcxx . . $ `src/main/color-conversion.h:79:9`! (1 << CHANNEL_R)
80 #define CMASK_Gcxx . . $ `src/main/color-conversion.h:80:9`! (1 << CHANNEL_G)
81 #define CMASK_Bcxx . . $ `src/main/color-conversion.h:81:9`! (1 << CHANNEL_B)
82 #define CMASK_RAWcxx . . $ `src/main/color-conversion.h:82:9`! (1 << CHANNEL_MAX)
83
84 typedef structcxx . . $ $anonymous_type_b1e744064c9709f4_3#
85 {
86 unsigned channel_idcxx . . $ $anonymous_type_b1e744064c9709f4_3#channel_id.;
87 const char *gamma_namecxx . . $ $anonymous_type_b1e744064c9709f4_3#gamma_name.;
88 const char *curve_namecxx . . $ $anonymous_type_b1e744064c9709f4_3#curve_name.;
89 const char *rgb_gamma_namecxx . . $ $anonymous_type_b1e744064c9709f4_3#rgb_gamma_name.;
90 const char *rgb_curve_namecxx . . $ $anonymous_type_b1e744064c9709f4_3#rgb_curve_name.;
91 } channel_param_tcxx . . $ channel_param_t#;
92
93 /* Color conversion function */
94 typedef unsigned (*stp_convert_tcxx . . $ stp_convert_t#)(const stp_vars_tcxx . . $ stp_vars_t# *vars,
95 const unsigned char *in,
96 unsigned short *out);
97
98 #define CMASK_NONEcxx . . $ `src/main/color-conversion.h:98:9`! (0)
99 #define CMASK_RGBcxx . . $ `src/main/color-conversion.h:99:9`! (CMASK_R | CMASK_G | CMASK_B)
100 #define CMASK_CMYcxx . . $ `src/main/color-conversion.h:100:9`! (CMASK_C | CMASK_M | CMASK_Y)
101 #define CMASK_CMYKcxx . . $ `src/main/color-conversion.h:101:9`! (CMASK_CMY | CMASK_K)
102 #define CMASK_ALLcxx . . $ `src/main/color-conversion.h:102:9`! (CMASK_CMYK | CMASK_RGB | CMASK_W)
103 #define CMASK_EVERYcxx . . $ `src/main/color-conversion.h:103:9`! (CMASK_ALL | CMASK_RAW)
104
105 typedef enumcxx . . $ $anonymous_type_b1e744064c9709f4_4#
106 {
107 COLOR_ID_GRAYcxx . . $ COLOR_ID_GRAY.,
108 COLOR_ID_WHITEcxx . . $ COLOR_ID_WHITE.,
109 COLOR_ID_RGBcxx . . $ COLOR_ID_RGB.,
110 COLOR_ID_CMYcxx . . $ COLOR_ID_CMY.,
111 COLOR_ID_CMYKcxx . . $ COLOR_ID_CMYK.,
112 COLOR_ID_KCMYcxx . . $ COLOR_ID_KCMY.,
113 COLOR_ID_RAWcxx . . $ COLOR_ID_RAW.
114 } color_id_tcxx . . $ color_id_t#;
115
116 typedef structcxx . . $ $anonymous_type_b1e744064c9709f4_5#
117 {
118 const char *namecxx . . $ $anonymous_type_b1e744064c9709f4_5#name.;
119 int inputcxx . . $ $anonymous_type_b1e744064c9709f4_5#input.;
120 int outputcxx . . $ $anonymous_type_b1e744064c9709f4_5#output.;
121 color_id_tcxx . . $ color_id_t# color_idcxx . . $ $anonymous_type_b1e744064c9709f4_5#color_id.;
122 color_model_tcxx . . $ color_model_t# color_modelcxx . . $ $anonymous_type_b1e744064c9709f4_5#color_model.;
123 unsigned channelscxx . . $ $anonymous_type_b1e744064c9709f4_5#channels.;
124 int channel_countcxx . . $ $anonymous_type_b1e744064c9709f4_5#channel_count.;
125 color_correction_enum_tcxx . . $ color_correction_enum_t# default_correctioncxx . . $ $anonymous_type_b1e744064c9709f4_5#default_correction.;
126 stp_convert_tcxx . . $ stp_convert_t# conversion_functioncxx . . $ $anonymous_type_b1e744064c9709f4_5#conversion_function.;
127 } color_description_tcxx . . $ color_description_t#;
128
129 typedef structcxx . . $ $anonymous_type_b1e744064c9709f4_6#
130 {
131 const char *namecxx . . $ $anonymous_type_b1e744064c9709f4_6#name.;
132 size_t bitscxx . . $ $anonymous_type_b1e744064c9709f4_6#bits.;
133 } channel_depth_tcxx . . $ channel_depth_t#;
134
135 typedef structcxx . . $ $anonymous_type_b1e744064c9709f4_7#
136 {
137 unsigned stepscxx . . $ $anonymous_type_b1e744064c9709f4_7#steps.;
138 int channel_depthcxx . . $ $anonymous_type_b1e744064c9709f4_7#channel_depth.;
139 int image_widthcxx . . $ $anonymous_type_b1e744064c9709f4_7#image_width.;
140 int in_channelscxx . . $ $anonymous_type_b1e744064c9709f4_7#in_channels.;
141 int out_channelscxx . . $ $anonymous_type_b1e744064c9709f4_7#out_channels.;
142 int channels_are_initializedcxx . . $ $anonymous_type_b1e744064c9709f4_7#channels_are_initialized.;
143 int invert_outputcxx . . $ $anonymous_type_b1e744064c9709f4_7#invert_output.;
144 const color_description_tcxx . . $ color_description_t# *input_color_descriptioncxx . . $ $anonymous_type_b1e744064c9709f4_7#input_color_description.;
145 const color_description_tcxx . . $ color_description_t# *output_color_descriptioncxx . . $ $anonymous_type_b1e744064c9709f4_7#output_color_description.;
146 const color_correction_tcxx . . $ color_correction_t# *color_correctioncxx . . $ $anonymous_type_b1e744064c9709f4_7#color_correction.;
147 stp_cached_curve_tcxx . . $ stp_cached_curve_t# brightness_correctioncxx . . $ $anonymous_type_b1e744064c9709f4_7#brightness_correction.;
148 stp_cached_curve_tcxx . . $ stp_cached_curve_t# contrast_correctioncxx . . $ $anonymous_type_b1e744064c9709f4_7#contrast_correction.;
149 stp_cached_curve_tcxx . . $ stp_cached_curve_t# user_color_correctioncxx . . $ $anonymous_type_b1e744064c9709f4_7#user_color_correction.;
150 stp_cached_curve_tcxx . . $ stp_cached_curve_t# channel_curvescxx . . $ $anonymous_type_b1e744064c9709f4_7#channel_curves.[STP_CHANNEL_LIMITcxx . . $ `include/gutenprint/image.h:48:9`!];
151 double gamma_valuescxx . . $ $anonymous_type_b1e744064c9709f4_7#gamma_values.[STP_CHANNEL_LIMITcxx . . $ `include/gutenprint/image.h:48:9`!];
152 double print_gammacxx . . $ $anonymous_type_b1e744064c9709f4_7#print_gamma.;
153 double app_gammacxx . . $ $anonymous_type_b1e744064c9709f4_7#app_gamma.;
154 double screen_gammacxx . . $ $anonymous_type_b1e744064c9709f4_7#screen_gamma.;
155 double contrastcxx . . $ $anonymous_type_b1e744064c9709f4_7#contrast.;
156 double brightnesscxx . . $ $anonymous_type_b1e744064c9709f4_7#brightness.;
157 int linear_contrast_adjustmentcxx . . $ $anonymous_type_b1e744064c9709f4_7#linear_contrast_adjustment.;
158 int printed_colorfunccxx . . $ $anonymous_type_b1e744064c9709f4_7#printed_colorfunc.;
159 int simple_gamma_correctioncxx . . $ $anonymous_type_b1e744064c9709f4_7#simple_gamma_correction.;
160 stp_cached_curve_tcxx . . $ stp_cached_curve_t# hue_mapcxx . . $ $anonymous_type_b1e744064c9709f4_7#hue_map.;
161 stp_cached_curve_tcxx . . $ stp_cached_curve_t# lum_mapcxx . . $ $anonymous_type_b1e744064c9709f4_7#lum_map.;
162 stp_cached_curve_tcxx . . $ stp_cached_curve_t# sat_mapcxx . . $ $anonymous_type_b1e744064c9709f4_7#sat_map.;
163 unsigned short *gray_tmpcxx . . $ $anonymous_type_b1e744064c9709f4_7#gray_tmp.; /* Color -> Gray */
164 unsigned short *cmy_tmpcxx . . $ $anonymous_type_b1e744064c9709f4_7#cmy_tmp.; /* CMY -> CMYK */
165 unsigned char *in_datacxx . . $ $anonymous_type_b1e744064c9709f4_7#in_data.;
166 } lut_tcxx . . $ lut_t#;
167
168 extern unsigned stpi_color_convert_to_graycxx . . $ stpi_color_convert_to_gray(98f9a2e5c8b4e8a4).(const stp_vars_tcxx . . $ stp_vars_t# *v,
169 const unsigned char *,
170 unsigned short *);
171 extern unsigned stpi_color_convert_to_colorcxx . . $ stpi_color_convert_to_color(98f9a2e5c8b4e8a4).(const stp_vars_tcxx . . $ stp_vars_t# *v,
172 const unsigned char *,
173 unsigned short *);
174 extern unsigned stpi_color_convert_to_kcmycxx . . $ stpi_color_convert_to_kcmy(98f9a2e5c8b4e8a4).(const stp_vars_tcxx . . $ stp_vars_t# *v,
175 const unsigned char *,
176 unsigned short *);
177 extern unsigned stpi_color_convert_rawcxx . . $ stpi_color_convert_raw(98f9a2e5c8b4e8a4).(const stp_vars_tcxx . . $ stp_vars_t# *v,
178 const unsigned char *,
179 unsigned short *);
180
181 #ifdef __cplusplus
182 }
183 #endif
184
185 #endif /* GUTENPRINT_INTERNAL_COLOR_CONVERSION_H */