| 1 | /* |
| 2 | * |
| 3 | * Gutenprint color management module - traditional Gutenprint 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 | /* |
| 23 | * This file must include only standard C header files. The core code must |
| 24 | * compile on generic platforms that don't support glib, gimp, gtk, etc. |
| 25 | */ |
| 26 | |
| 27 | #ifdef HAVE_CONFIG_Hcxx . . $ `<built-in>:409:9`! |
| 28 | #include <config.h>cxx . . $ `<file>/config.h`/ |
| 29 | #endif |
| 30 | #include <gutenprint/gutenprint.h>cxx . . $ `<file>/include/gutenprint/gutenprint.h`/ |
| 31 | #include "gutenprint-internal.h"cxx . . $ `<file>/src/main/gutenprint-internal.h`/ |
| 32 | #include <gutenprint/gutenprint-intl-internal.h>cxx . . $ `<file>/include/gutenprint/gutenprint-intl-internal.h`/ |
| 33 | #include <gutenprint/curve-cache.h>cxx . . $ `<file>/include/gutenprint/curve-cache.h`/ |
| 34 | #include <math.h> |
| 35 | #ifdef HAVE_LIMITS_Hcxx . . $ `../../config.h:94:9`! |
| 36 | #include <limits.h> |
| 37 | #endif |
| 38 | #include <string.h> |
| 39 | #include "color-conversion.h"cxx . . $ `<file>/src/main/color-conversion.h`/ |
| 40 | |
| 41 | #ifdef __GNUC__cxx . . $ `<built-in>:8:9`! |
| 42 | #define inlinecxx . . $ `src/main/print-color.c:42:9`! __inline__ |
| 43 | #endif |
| 44 | |
| 45 | static const color_correction_tcxx . . $ color_correction_t# color_correctionscxx . . $ color_corrections.[] = |
| 46 | { |
| 47 | { "None", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Default"), COLOR_CORRECTION_DEFAULTcxx . . $ COLOR_CORRECTION_DEFAULT., 1 }, |
| 48 | { "Accurate", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("High Accuracy"), COLOR_CORRECTION_ACCURATEcxx . . $ COLOR_CORRECTION_ACCURATE., 1 }, |
| 49 | { "Bright", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Bright Colors"), COLOR_CORRECTION_BRIGHTcxx . . $ COLOR_CORRECTION_BRIGHT., 1 }, |
| 50 | { "Hue", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Correct Hue Only"), COLOR_CORRECTION_HUEcxx . . $ COLOR_CORRECTION_HUE., 1 }, |
| 51 | { "Uncorrected", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Uncorrected"), COLOR_CORRECTION_UNCORRECTEDcxx . . $ COLOR_CORRECTION_UNCORRECTED., 0 }, |
| 52 | { "Desaturated", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Desaturated"), COLOR_CORRECTION_DESATURATEDcxx . . $ COLOR_CORRECTION_DESATURATED., 0 }, |
| 53 | { "Threshold", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Threshold"), COLOR_CORRECTION_THRESHOLDcxx . . $ COLOR_CORRECTION_THRESHOLD., 0 }, |
| 54 | { "Density", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Density"), COLOR_CORRECTION_DENSITYcxx . . $ COLOR_CORRECTION_DENSITY., 0 }, |
| 55 | { "Raw", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Raw"), COLOR_CORRECTION_RAWcxx . . $ COLOR_CORRECTION_RAW., 0 }, |
| 56 | { "Predithered", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Pre-Dithered"), COLOR_CORRECTION_PREDITHEREDcxx . . $ COLOR_CORRECTION_PREDITHERED., 0 }, |
| 57 | }; |
| 58 | |
| 59 | static const int color_correction_countcxx . . $ color_correction_count. = |
| 60 | sizeof(color_correctionscxx . . $ color_corrections.) / sizeof(color_correction_tcxx . . $ color_correction_t#); |
| 61 | |
| 62 | static const channel_param_tcxx . . $ channel_param_t# channel_paramscxx . . $ channel_params.[] = |
| 63 | { |
| 64 | { CMASK_Kcxx . . $ `src/main/color-conversion.h:74:9`!, "BlackGamma", "BlackCurve", "WhiteGamma", "WhiteCurve" }, |
| 65 | { CMASK_Ccxx . . $ `src/main/color-conversion.h:75:9`!, "CyanGamma", "CyanCurve", "RedGamma", "RedCurve" }, |
| 66 | { CMASK_Mcxx . . $ `src/main/color-conversion.h:76:9`!, "MagentaGamma", "MagentaCurve", "GreenGamma", "GreenCurve" }, |
| 67 | { CMASK_Ycxx . . $ `src/main/color-conversion.h:77:9`!, "YellowGamma", "YellowCurve", "BlueGamma", "BlueCurve" }, |
| 68 | { CMASK_Wcxx . . $ `src/main/color-conversion.h:78:9`!, "WhiteGamma", "WhiteCurve", "BlackGamma", "BlackCurve" }, |
| 69 | { CMASK_Rcxx . . $ `src/main/color-conversion.h:79:9`!, "RedGamma", "RedCurve", "CyanGamma", "CyanCurve" }, |
| 70 | { CMASK_Gcxx . . $ `src/main/color-conversion.h:80:9`!, "GreenGamma", "GreenCurve", "MagentaGamma", "MagentaCurve" }, |
| 71 | { CMASK_Bcxx . . $ `src/main/color-conversion.h:81:9`!, "BlueGamma", "BlueCurve", "YellowGamma", "YellowCurve" }, |
| 72 | }; |
| 73 | |
| 74 | static const int channel_param_countcxx . . $ channel_param_count. = |
| 75 | sizeof(channel_paramscxx . . $ channel_params.) / sizeof(channel_param_tcxx . . $ channel_param_t#); |
| 76 | |
| 77 | static const channel_param_tcxx . . $ channel_param_t# raw_channel_paramscxx . . $ raw_channel_params.[] = |
| 78 | { |
| 79 | { 0, "GammaCh0", "CurveCh0", "GammaCh0", "CurveCh0" }, |
| 80 | { 1, "GammaCh1", "CurveCh1", "GammaCh1", "CurveCh1" }, |
| 81 | { 2, "GammaCh2", "CurveCh2", "GammaCh2", "CurveCh2" }, |
| 82 | { 3, "GammaCh3", "CurveCh3", "GammaCh3", "CurveCh3" }, |
| 83 | { 4, "GammaCh4", "CurveCh4", "GammaCh4", "CurveCh4" }, |
| 84 | { 5, "GammaCh5", "CurveCh5", "GammaCh5", "CurveCh5" }, |
| 85 | { 6, "GammaCh6", "CurveCh6", "GammaCh6", "CurveCh6" }, |
| 86 | { 7, "GammaCh7", "CurveCh7", "GammaCh7", "CurveCh7" }, |
| 87 | { 8, "GammaCh8", "CurveCh8", "GammaCh8", "CurveCh8" }, |
| 88 | { 9, "GammaCh9", "CurveCh9", "GammaCh9", "CurveCh9" }, |
| 89 | { 10, "GammaCh10", "CurveCh10", "GammaCh10", "CurveCh10" }, |
| 90 | { 11, "GammaCh11", "CurveCh11", "GammaCh11", "CurveCh11" }, |
| 91 | { 12, "GammaCh12", "CurveCh12", "GammaCh12", "CurveCh12" }, |
| 92 | { 13, "GammaCh13", "CurveCh13", "GammaCh13", "CurveCh13" }, |
| 93 | { 14, "GammaCh14", "CurveCh14", "GammaCh14", "CurveCh14" }, |
| 94 | { 15, "GammaCh15", "CurveCh15", "GammaCh15", "CurveCh15" }, |
| 95 | { 16, "GammaCh16", "CurveCh16", "GammaCh16", "CurveCh16" }, |
| 96 | { 17, "GammaCh17", "CurveCh17", "GammaCh17", "CurveCh17" }, |
| 97 | { 18, "GammaCh18", "CurveCh18", "GammaCh18", "CurveCh18" }, |
| 98 | { 19, "GammaCh19", "CurveCh19", "GammaCh19", "CurveCh19" }, |
| 99 | { 20, "GammaCh20", "CurveCh20", "GammaCh20", "CurveCh20" }, |
| 100 | { 21, "GammaCh21", "CurveCh21", "GammaCh21", "CurveCh21" }, |
| 101 | { 22, "GammaCh22", "CurveCh22", "GammaCh22", "CurveCh22" }, |
| 102 | { 23, "GammaCh23", "CurveCh23", "GammaCh23", "CurveCh23" }, |
| 103 | { 24, "GammaCh24", "CurveCh24", "GammaCh24", "CurveCh24" }, |
| 104 | { 25, "GammaCh25", "CurveCh25", "GammaCh25", "CurveCh25" }, |
| 105 | { 26, "GammaCh26", "CurveCh26", "GammaCh26", "CurveCh26" }, |
| 106 | { 27, "GammaCh27", "CurveCh27", "GammaCh27", "CurveCh27" }, |
| 107 | { 28, "GammaCh28", "CurveCh28", "GammaCh28", "CurveCh28" }, |
| 108 | { 29, "GammaCh29", "CurveCh29", "GammaCh29", "CurveCh29" }, |
| 109 | { 30, "GammaCh30", "CurveCh30", "GammaCh30", "CurveCh30" }, |
| 110 | { 31, "GammaCh31", "CurveCh31", "GammaCh31", "CurveCh31" }, |
| 111 | { 32, "GammaCh32", "CurveCh32", "GammaCh32", "CurveCh32" }, |
| 112 | { 33, "GammaCh33", "CurveCh33", "GammaCh33", "CurveCh33" }, |
| 113 | { 34, "GammaCh34", "CurveCh34", "GammaCh34", "CurveCh34" }, |
| 114 | { 35, "GammaCh35", "CurveCh35", "GammaCh35", "CurveCh35" }, |
| 115 | { 36, "GammaCh36", "CurveCh36", "GammaCh36", "CurveCh36" }, |
| 116 | { 37, "GammaCh37", "CurveCh37", "GammaCh37", "CurveCh37" }, |
| 117 | { 38, "GammaCh38", "CurveCh38", "GammaCh38", "CurveCh38" }, |
| 118 | { 39, "GammaCh39", "CurveCh39", "GammaCh39", "CurveCh39" }, |
| 119 | { 40, "GammaCh40", "CurveCh40", "GammaCh40", "CurveCh40" }, |
| 120 | { 41, "GammaCh41", "CurveCh41", "GammaCh41", "CurveCh41" }, |
| 121 | { 42, "GammaCh42", "CurveCh42", "GammaCh42", "CurveCh42" }, |
| 122 | { 43, "GammaCh43", "CurveCh43", "GammaCh43", "CurveCh43" }, |
| 123 | { 44, "GammaCh44", "CurveCh44", "GammaCh44", "CurveCh44" }, |
| 124 | { 45, "GammaCh45", "CurveCh45", "GammaCh45", "CurveCh45" }, |
| 125 | { 46, "GammaCh46", "CurveCh46", "GammaCh46", "CurveCh46" }, |
| 126 | { 47, "GammaCh47", "CurveCh47", "GammaCh47", "CurveCh47" }, |
| 127 | { 48, "GammaCh48", "CurveCh48", "GammaCh48", "CurveCh48" }, |
| 128 | { 49, "GammaCh49", "CurveCh49", "GammaCh49", "CurveCh49" }, |
| 129 | { 50, "GammaCh50", "CurveCh50", "GammaCh50", "CurveCh50" }, |
| 130 | { 51, "GammaCh51", "CurveCh51", "GammaCh51", "CurveCh51" }, |
| 131 | { 52, "GammaCh52", "CurveCh52", "GammaCh52", "CurveCh52" }, |
| 132 | { 53, "GammaCh53", "CurveCh53", "GammaCh53", "CurveCh53" }, |
| 133 | { 54, "GammaCh54", "CurveCh54", "GammaCh54", "CurveCh54" }, |
| 134 | { 55, "GammaCh55", "CurveCh55", "GammaCh55", "CurveCh55" }, |
| 135 | { 56, "GammaCh56", "CurveCh56", "GammaCh56", "CurveCh56" }, |
| 136 | { 57, "GammaCh57", "CurveCh57", "GammaCh57", "CurveCh57" }, |
| 137 | { 58, "GammaCh58", "CurveCh58", "GammaCh58", "CurveCh58" }, |
| 138 | { 59, "GammaCh59", "CurveCh59", "GammaCh59", "CurveCh59" }, |
| 139 | { 60, "GammaCh60", "CurveCh60", "GammaCh60", "CurveCh60" }, |
| 140 | { 61, "GammaCh61", "CurveCh61", "GammaCh61", "CurveCh61" }, |
| 141 | { 62, "GammaCh62", "CurveCh62", "GammaCh62", "CurveCh62" }, |
| 142 | { 63, "GammaCh63", "CurveCh63", "GammaCh63", "CurveCh63" }, |
| 143 | }; |
| 144 | |
| 145 | static const int raw_channel_param_countcxx . . $ raw_channel_param_count. = |
| 146 | sizeof(raw_channel_paramscxx . . $ raw_channel_params.) / sizeof(channel_param_tcxx . . $ channel_param_t#); |
| 147 | |
| 148 | |
| 149 | static const color_description_tcxx . . $ color_description_t# color_descriptionscxx . . $ color_descriptions.[] = |
| 150 | { |
| 151 | { N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Grayscale"), 1, 1, COLOR_ID_GRAYcxx . . $ COLOR_ID_GRAY., COLOR_BLACKcxx . . $ COLOR_BLACK., CMASK_Kcxx . . $ `src/main/color-conversion.h:74:9`!, 1, |
| 152 | COLOR_CORRECTION_UNCORRECTEDcxx . . $ COLOR_CORRECTION_UNCORRECTED., &stpi_color_convert_to_graycxx . . $ stpi_color_convert_to_gray(98f9a2e5c8b4e8a4). }, |
| 153 | { N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Whitescale"), 1, 1, COLOR_ID_WHITEcxx . . $ COLOR_ID_WHITE., COLOR_WHITEcxx . . $ COLOR_WHITE., CMASK_Kcxx . . $ `src/main/color-conversion.h:74:9`!, 1, |
| 154 | COLOR_CORRECTION_UNCORRECTEDcxx . . $ COLOR_CORRECTION_UNCORRECTED., &stpi_color_convert_to_graycxx . . $ stpi_color_convert_to_gray(98f9a2e5c8b4e8a4). }, |
| 155 | { N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("RGB"), 1, 1, COLOR_ID_RGBcxx . . $ COLOR_ID_RGB., COLOR_WHITEcxx . . $ COLOR_WHITE., CMASK_CMYcxx . . $ `src/main/color-conversion.h:100:9`!, 3, |
| 156 | COLOR_CORRECTION_ACCURATEcxx . . $ COLOR_CORRECTION_ACCURATE., &stpi_color_convert_to_colorcxx . . $ stpi_color_convert_to_color(98f9a2e5c8b4e8a4). }, |
| 157 | { N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("CMY"), 1, 1, COLOR_ID_CMYcxx . . $ COLOR_ID_CMY., COLOR_BLACKcxx . . $ COLOR_BLACK., CMASK_CMYcxx . . $ `src/main/color-conversion.h:100:9`!, 3, |
| 158 | COLOR_CORRECTION_ACCURATEcxx . . $ COLOR_CORRECTION_ACCURATE., &stpi_color_convert_to_colorcxx . . $ stpi_color_convert_to_color(98f9a2e5c8b4e8a4). }, |
| 159 | { N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("CMYK"), 1, 0, COLOR_ID_CMYKcxx . . $ COLOR_ID_CMYK., COLOR_BLACKcxx . . $ COLOR_BLACK., CMASK_CMYKcxx . . $ `src/main/color-conversion.h:101:9`!, 4, |
| 160 | COLOR_CORRECTION_ACCURATEcxx . . $ COLOR_CORRECTION_ACCURATE., &stpi_color_convert_to_kcmycxx . . $ stpi_color_convert_to_kcmy(98f9a2e5c8b4e8a4). }, |
| 161 | { N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("KCMY"), 1, 1, COLOR_ID_KCMYcxx . . $ COLOR_ID_KCMY., COLOR_BLACKcxx . . $ COLOR_BLACK., CMASK_CMYKcxx . . $ `src/main/color-conversion.h:101:9`!, 4, |
| 162 | COLOR_CORRECTION_ACCURATEcxx . . $ COLOR_CORRECTION_ACCURATE., &stpi_color_convert_to_kcmycxx . . $ stpi_color_convert_to_kcmy(98f9a2e5c8b4e8a4). }, |
| 163 | { N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Raw"), 1, 1, COLOR_ID_RAWcxx . . $ COLOR_ID_RAW., COLOR_UNKNOWNcxx . . $ COLOR_UNKNOWN., 0, -1, |
| 164 | COLOR_CORRECTION_RAWcxx . . $ COLOR_CORRECTION_RAW., &stpi_color_convert_rawcxx . . $ stpi_color_convert_raw(98f9a2e5c8b4e8a4). }, |
| 165 | }; |
| 166 | |
| 167 | static const int color_description_countcxx . . $ color_description_count. = |
| 168 | sizeof(color_descriptionscxx . . $ color_descriptions.) / sizeof(color_description_tcxx . . $ color_description_t#); |
| 169 | |
| 170 | |
| 171 | static const channel_depth_tcxx . . $ channel_depth_t# channel_depthscxx . . $ channel_depths.[] = |
| 172 | { |
| 173 | { "8", 8 }, |
| 174 | { "16", 16 } |
| 175 | }; |
| 176 | |
| 177 | static const int channel_depth_countcxx . . $ channel_depth_count. = |
| 178 | sizeof(channel_depthscxx . . $ channel_depths.) / sizeof(channel_depth_tcxx . . $ channel_depth_t#); |
| 179 | |
| 180 | |
| 181 | typedef structcxx . . $ $anonymous_type_edce4fe85e1ab4c7_0# |
| 182 | { |
| 183 | const stp_parameter_tcxx . . $ stp_parameter_t# paramcxx . . $ $anonymous_type_edce4fe85e1ab4c7_0#param.; |
| 184 | double mincxx . . $ $anonymous_type_edce4fe85e1ab4c7_0#min.; |
| 185 | double maxcxx . . $ $anonymous_type_edce4fe85e1ab4c7_0#max.; |
| 186 | double defvalcxx . . $ $anonymous_type_edce4fe85e1ab4c7_0#defval.; |
| 187 | unsigned channel_maskcxx . . $ $anonymous_type_edce4fe85e1ab4c7_0#channel_mask.; |
| 188 | int color_onlycxx . . $ $anonymous_type_edce4fe85e1ab4c7_0#color_only.; |
| 189 | int is_rgbcxx . . $ $anonymous_type_edce4fe85e1ab4c7_0#is_rgb.; |
| 190 | } float_param_tcxx . . $ float_param_t#; |
| 191 | |
| 192 | #define RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(channel) \ |
| 193 | { \ |
| 194 | { \ |
| 195 | "GammaCh" #channel, N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Channel " #channel " Gamma"), "Color=Yes,Category=Gamma", \ |
| 196 | N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Gamma for raw channel " #channel), \ |
| 197 | STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT, \ |
| 198 | STP_PARAMETER_LEVEL_INTERNAL, 0, 1, channel, 1, 0 \ |
| 199 | }, 0.1, 4.0, 1.0, CMASK_RAWcxx . . $ `src/main/color-conversion.h:82:9`!, 0, -1 \ |
| 200 | } |
| 201 | |
| 202 | static const float_param_tcxx . . $ float_param_t# float_parameterscxx . . $ float_parameters.[] = |
| 203 | { |
| 204 | { |
| 205 | { |
| 206 | "ColorCorrection", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Color Correction"), "Color=Yes,Category=Basic Image Adjustment", |
| 207 | N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Color correction to be applied"), |
| 208 | STP_PARAMETER_TYPE_STRING_LISTcxx . . $ STP_PARAMETER_TYPE_STRING_LIST., STP_PARAMETER_CLASS_OUTPUTcxx . . $ STP_PARAMETER_CLASS_OUTPUT., |
| 209 | STP_PARAMETER_LEVEL_BASICcxx . . $ STP_PARAMETER_LEVEL_BASIC., 1, 1, -1, 1, 0 |
| 210 | }, 0.0, 0.0, 0.0, CMASK_EVERYcxx . . $ `src/main/color-conversion.h:103:9`!, 0, -1 |
| 211 | }, |
| 212 | { |
| 213 | { |
| 214 | "ChannelBitDepth", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Channel Bit Depth"), "Color=Yes,Category=Core Parameter", |
| 215 | N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Bit depth per channel"), |
| 216 | STP_PARAMETER_TYPE_STRING_LISTcxx . . $ STP_PARAMETER_TYPE_STRING_LIST., STP_PARAMETER_CLASS_COREcxx . . $ STP_PARAMETER_CLASS_CORE., |
| 217 | STP_PARAMETER_LEVEL_BASICcxx . . $ STP_PARAMETER_LEVEL_BASIC., 1, 1, -1, 1, 0 |
| 218 | }, 0.0, 0.0, 0.0, CMASK_EVERYcxx . . $ `src/main/color-conversion.h:103:9`!, 0, -1 |
| 219 | }, |
| 220 | { |
| 221 | { |
| 222 | "InputImageType", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Input Image Type"), "Color=Yes,Category=Core Parameter", |
| 223 | N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Input image type"), |
| 224 | STP_PARAMETER_TYPE_STRING_LISTcxx . . $ STP_PARAMETER_TYPE_STRING_LIST., STP_PARAMETER_CLASS_COREcxx . . $ STP_PARAMETER_CLASS_CORE., |
| 225 | STP_PARAMETER_LEVEL_BASICcxx . . $ STP_PARAMETER_LEVEL_BASIC., 1, 1, -1, 1, 0 |
| 226 | }, 0.0, 0.0, 0.0, CMASK_EVERYcxx . . $ `src/main/color-conversion.h:103:9`!, 0, -1 |
| 227 | }, |
| 228 | { |
| 229 | { |
| 230 | "STPIOutputType", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Output Image Type"), "Color=Yes,Category=Core Parameter", |
| 231 | N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Output image type"), |
| 232 | STP_PARAMETER_TYPE_STRING_LISTcxx . . $ STP_PARAMETER_TYPE_STRING_LIST., STP_PARAMETER_CLASS_COREcxx . . $ STP_PARAMETER_CLASS_CORE., |
| 233 | STP_PARAMETER_LEVEL_INTERNALcxx . . $ STP_PARAMETER_LEVEL_INTERNAL., 1, 1, -1, 1, 0 |
| 234 | }, 0.0, 0.0, 0.0, CMASK_EVERYcxx . . $ `src/main/color-conversion.h:103:9`!, 0, -1 |
| 235 | }, |
| 236 | { |
| 237 | { |
| 238 | "STPIRawChannels", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Raw Channels"), "Color=Yes,Category=Core Parameter", |
| 239 | N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Raw Channels"), |
| 240 | STP_PARAMETER_TYPE_INTcxx . . $ STP_PARAMETER_TYPE_INT., STP_PARAMETER_CLASS_COREcxx . . $ STP_PARAMETER_CLASS_CORE., |
| 241 | STP_PARAMETER_LEVEL_INTERNALcxx . . $ STP_PARAMETER_LEVEL_INTERNAL., 1, 1, -1, 1, 0 |
| 242 | }, 1.0, STP_CHANNEL_LIMITcxx . . $ `include/gutenprint/image.h:48:9`!, 1.0, CMASK_EVERYcxx . . $ `src/main/color-conversion.h:103:9`!, 0, -1 |
| 243 | }, |
| 244 | { |
| 245 | { |
| 246 | "SimpleGamma", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("SimpleGamma"), "Color=Yes,Category=Gamma", |
| 247 | N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Do not correct for screen gamma"), |
| 248 | STP_PARAMETER_TYPE_BOOLEANcxx . . $ STP_PARAMETER_TYPE_BOOLEAN., STP_PARAMETER_CLASS_OUTPUTcxx . . $ STP_PARAMETER_CLASS_OUTPUT., |
| 249 | STP_PARAMETER_LEVEL_INTERNALcxx . . $ STP_PARAMETER_LEVEL_INTERNAL., 0, 1, -1, 1, 0 |
| 250 | }, 0.0, 1.0, 0.0, CMASK_EVERYcxx . . $ `src/main/color-conversion.h:103:9`!, 0, -1 |
| 251 | }, |
| 252 | { |
| 253 | { |
| 254 | "Brightness", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Brightness"), "Color=Yes,Category=Basic Image Adjustment", |
| 255 | N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Brightness of the print"), |
| 256 | STP_PARAMETER_TYPE_DOUBLEcxx . . $ STP_PARAMETER_TYPE_DOUBLE., STP_PARAMETER_CLASS_OUTPUTcxx . . $ STP_PARAMETER_CLASS_OUTPUT., |
| 257 | STP_PARAMETER_LEVEL_BASICcxx . . $ STP_PARAMETER_LEVEL_BASIC., 1, 1, -1, 1, 0 |
| 258 | }, 0.0, 2.0, 1.0, CMASK_ALLcxx . . $ `src/main/color-conversion.h:102:9`!, 0, -1 |
| 259 | }, |
| 260 | { |
| 261 | { |
| 262 | "Contrast", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Contrast"), "Color=Yes,Category=Basic Image Adjustment", |
| 263 | N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Contrast of the print (0 is solid gray)"), |
| 264 | STP_PARAMETER_TYPE_DOUBLEcxx . . $ STP_PARAMETER_TYPE_DOUBLE., STP_PARAMETER_CLASS_OUTPUTcxx . . $ STP_PARAMETER_CLASS_OUTPUT., |
| 265 | STP_PARAMETER_LEVEL_BASICcxx . . $ STP_PARAMETER_LEVEL_BASIC., 1, 1, -1, 1, 0 |
| 266 | }, 0.0, 4.0, 1.0, CMASK_ALLcxx . . $ `src/main/color-conversion.h:102:9`!, 0, -1 |
| 267 | }, |
| 268 | { |
| 269 | { |
| 270 | "LinearContrast", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Linear Contrast Adjustment"), "Color=Yes,Category=Advanced Image Control", |
| 271 | N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Use linear vs. fixed end point contrast adjustment"), |
| 272 | STP_PARAMETER_TYPE_BOOLEANcxx . . $ STP_PARAMETER_TYPE_BOOLEAN., STP_PARAMETER_CLASS_OUTPUTcxx . . $ STP_PARAMETER_CLASS_OUTPUT., |
| 273 | STP_PARAMETER_LEVEL_ADVANCED3cxx . . $ STP_PARAMETER_LEVEL_ADVANCED3., 1, 1, -1, 1, 0 |
| 274 | }, 0.0, 0.0, 0.0, CMASK_ALLcxx . . $ `src/main/color-conversion.h:102:9`!, 0, -1 |
| 275 | }, |
| 276 | { |
| 277 | { |
| 278 | "Gamma", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Composite Gamma"), "Color=Yes,Category=Gamma", |
| 279 | N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Adjust the gamma of the print. Larger values will " |
| 280 | "produce a generally brighter print, while smaller " |
| 281 | "values will produce a generally darker print. "), |
| 282 | STP_PARAMETER_TYPE_DOUBLEcxx . . $ STP_PARAMETER_TYPE_DOUBLE., STP_PARAMETER_CLASS_OUTPUTcxx . . $ STP_PARAMETER_CLASS_OUTPUT., |
| 283 | STP_PARAMETER_LEVEL_ADVANCED1cxx . . $ STP_PARAMETER_LEVEL_ADVANCED1., 0, 1, -1, 1, 0 |
| 284 | }, 0.1, 4.0, 1.0, CMASK_EVERYcxx . . $ `src/main/color-conversion.h:103:9`!, 0, -1 |
| 285 | }, |
| 286 | { |
| 287 | { |
| 288 | "AppGamma", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("AppGamma"), "Color=Yes,Category=Gamma", |
| 289 | N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Gamma value assumed by application"), |
| 290 | STP_PARAMETER_TYPE_DOUBLEcxx . . $ STP_PARAMETER_TYPE_DOUBLE., STP_PARAMETER_CLASS_OUTPUTcxx . . $ STP_PARAMETER_CLASS_OUTPUT., |
| 291 | STP_PARAMETER_LEVEL_INTERNALcxx . . $ STP_PARAMETER_LEVEL_INTERNAL., 0, 1, -1, 1, 0 |
| 292 | }, 0.1, 4.0, 1.0, CMASK_EVERYcxx . . $ `src/main/color-conversion.h:103:9`!, 0, -1 |
| 293 | }, |
| 294 | { |
| 295 | { |
| 296 | "CyanGamma", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Cyan"), "Color=Yes,Category=Gamma", |
| 297 | N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Adjust the cyan gamma"), |
| 298 | STP_PARAMETER_TYPE_DOUBLEcxx . . $ STP_PARAMETER_TYPE_DOUBLE., STP_PARAMETER_CLASS_OUTPUTcxx . . $ STP_PARAMETER_CLASS_OUTPUT., |
| 299 | STP_PARAMETER_LEVEL_ADVANCED1cxx . . $ STP_PARAMETER_LEVEL_ADVANCED1., 0, 1, 1, 1, 0 |
| 300 | }, 0.0, 4.0, 1.0, CMASK_Ccxx . . $ `src/main/color-conversion.h:75:9`!, 1, 0 |
| 301 | }, |
| 302 | { |
| 303 | { |
| 304 | "MagentaGamma", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Magenta"), "Color=Yes,Category=Gamma", |
| 305 | N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Adjust the magenta gamma"), |
| 306 | STP_PARAMETER_TYPE_DOUBLEcxx . . $ STP_PARAMETER_TYPE_DOUBLE., STP_PARAMETER_CLASS_OUTPUTcxx . . $ STP_PARAMETER_CLASS_OUTPUT., |
| 307 | STP_PARAMETER_LEVEL_ADVANCED1cxx . . $ STP_PARAMETER_LEVEL_ADVANCED1., 0, 1, 2, 1, 0 |
| 308 | }, 0.0, 4.0, 1.0, CMASK_Mcxx . . $ `src/main/color-conversion.h:76:9`!, 1, 0 |
| 309 | }, |
| 310 | { |
| 311 | { |
| 312 | "YellowGamma", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Yellow"), "Color=Yes,Category=Gamma", |
| 313 | N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Adjust the yellow gamma"), |
| 314 | STP_PARAMETER_TYPE_DOUBLEcxx . . $ STP_PARAMETER_TYPE_DOUBLE., STP_PARAMETER_CLASS_OUTPUTcxx . . $ STP_PARAMETER_CLASS_OUTPUT., |
| 315 | STP_PARAMETER_LEVEL_ADVANCED1cxx . . $ STP_PARAMETER_LEVEL_ADVANCED1., 0, 1, 3, 1, 0 |
| 316 | }, 0.0, 4.0, 1.0, CMASK_Ycxx . . $ `src/main/color-conversion.h:77:9`!, 1, 0 |
| 317 | }, |
| 318 | { |
| 319 | { |
| 320 | "RedGamma", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Red"), "Color=Yes,Category=Gamma", |
| 321 | N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Adjust the red gamma"), |
| 322 | STP_PARAMETER_TYPE_DOUBLEcxx . . $ STP_PARAMETER_TYPE_DOUBLE., STP_PARAMETER_CLASS_OUTPUTcxx . . $ STP_PARAMETER_CLASS_OUTPUT., |
| 323 | STP_PARAMETER_LEVEL_ADVANCED1cxx . . $ STP_PARAMETER_LEVEL_ADVANCED1., 0, 1, 1, 1, 0 |
| 324 | }, 0.0, 4.0, 1.0, CMASK_Ccxx . . $ `src/main/color-conversion.h:75:9`!, 1, 1 |
| 325 | }, |
| 326 | { |
| 327 | { |
| 328 | "GreenGamma", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Green"), "Color=Yes,Category=Gamma", |
| 329 | N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Adjust the green gamma"), |
| 330 | STP_PARAMETER_TYPE_DOUBLEcxx . . $ STP_PARAMETER_TYPE_DOUBLE., STP_PARAMETER_CLASS_OUTPUTcxx . . $ STP_PARAMETER_CLASS_OUTPUT., |
| 331 | STP_PARAMETER_LEVEL_ADVANCED1cxx . . $ STP_PARAMETER_LEVEL_ADVANCED1., 0, 1, 2, 1, 0 |
| 332 | }, 0.0, 4.0, 1.0, CMASK_Mcxx . . $ `src/main/color-conversion.h:76:9`!, 1, 1 |
| 333 | }, |
| 334 | { |
| 335 | { |
| 336 | "BlueGamma", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Blue"), "Color=Yes,Category=Gamma", |
| 337 | N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Adjust the blue gamma"), |
| 338 | STP_PARAMETER_TYPE_DOUBLEcxx . . $ STP_PARAMETER_TYPE_DOUBLE., STP_PARAMETER_CLASS_OUTPUTcxx . . $ STP_PARAMETER_CLASS_OUTPUT., |
| 339 | STP_PARAMETER_LEVEL_ADVANCED1cxx . . $ STP_PARAMETER_LEVEL_ADVANCED1., 0, 1, 3, 1, 0 |
| 340 | }, 0.0, 4.0, 1.0, CMASK_Ycxx . . $ `src/main/color-conversion.h:77:9`!, 1, 1 |
| 341 | }, |
| 342 | { |
| 343 | { |
| 344 | "BlackGamma", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Black"), "Color=Yes,Category=Gamma", |
| 345 | N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Adjust the black gamma"), |
| 346 | STP_PARAMETER_TYPE_DOUBLEcxx . . $ STP_PARAMETER_TYPE_DOUBLE., STP_PARAMETER_CLASS_OUTPUTcxx . . $ STP_PARAMETER_CLASS_OUTPUT., |
| 347 | STP_PARAMETER_LEVEL_ADVANCED1cxx . . $ STP_PARAMETER_LEVEL_ADVANCED1., 0, 1, 3, 1, 0 |
| 348 | }, 0.0, 4.0, 1.0, CMASK_Kcxx . . $ `src/main/color-conversion.h:74:9`!, 1, 0 |
| 349 | }, |
| 350 | { |
| 351 | { |
| 352 | "CyanBalance", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Cyan Balance"), "Color=Yes,Category=GrayBalance", |
| 353 | N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Adjust the cyan gray balance"), |
| 354 | STP_PARAMETER_TYPE_DOUBLEcxx . . $ STP_PARAMETER_TYPE_DOUBLE., STP_PARAMETER_CLASS_OUTPUTcxx . . $ STP_PARAMETER_CLASS_OUTPUT., |
| 355 | STP_PARAMETER_LEVEL_ADVANCED1cxx . . $ STP_PARAMETER_LEVEL_ADVANCED1., 0, 1, 1, 1, 0 |
| 356 | }, 0.0, 1.0, 1.0, CMASK_Ccxx . . $ `src/main/color-conversion.h:75:9`!, 1, 0 |
| 357 | }, |
| 358 | { |
| 359 | { |
| 360 | "MagentaBalance", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Magenta Balance"), "Color=Yes,Category=GrayBalance", |
| 361 | N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Adjust the magenta gray balance"), |
| 362 | STP_PARAMETER_TYPE_DOUBLEcxx . . $ STP_PARAMETER_TYPE_DOUBLE., STP_PARAMETER_CLASS_OUTPUTcxx . . $ STP_PARAMETER_CLASS_OUTPUT., |
| 363 | STP_PARAMETER_LEVEL_ADVANCED1cxx . . $ STP_PARAMETER_LEVEL_ADVANCED1., 0, 1, 2, 1, 0 |
| 364 | }, 0.0, 1.0, 1.0, CMASK_Mcxx . . $ `src/main/color-conversion.h:76:9`!, 1, 0 |
| 365 | }, |
| 366 | { |
| 367 | { |
| 368 | "YellowBalance", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Yellow Balance"), "Color=Yes,Category=GrayBalance", |
| 369 | N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Adjust the yellow gray balance"), |
| 370 | STP_PARAMETER_TYPE_DOUBLEcxx . . $ STP_PARAMETER_TYPE_DOUBLE., STP_PARAMETER_CLASS_OUTPUTcxx . . $ STP_PARAMETER_CLASS_OUTPUT., |
| 371 | STP_PARAMETER_LEVEL_ADVANCED1cxx . . $ STP_PARAMETER_LEVEL_ADVANCED1., 0, 1, 3, 1, 0 |
| 372 | }, 0.0, 1.0, 1.0, CMASK_Ycxx . . $ `src/main/color-conversion.h:77:9`!, 1, 0 |
| 373 | }, |
| 374 | { |
| 375 | { |
| 376 | "Saturation", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Saturation"), "Color=Yes,Category=Basic Image Adjustment", |
| 377 | N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Adjust the saturation (color balance) of the print\n" |
| 378 | "Use zero saturation to produce grayscale output " |
| 379 | "using color and black inks"), |
| 380 | STP_PARAMETER_TYPE_DOUBLEcxx . . $ STP_PARAMETER_TYPE_DOUBLE., STP_PARAMETER_CLASS_OUTPUTcxx . . $ STP_PARAMETER_CLASS_OUTPUT., |
| 381 | STP_PARAMETER_LEVEL_BASICcxx . . $ STP_PARAMETER_LEVEL_BASIC., 1, 1, -1, 1, 0 |
| 382 | }, 0.0, 9.0, 1.0, CMASK_CMYcxx . . $ `src/main/color-conversion.h:100:9`! | CMASK_RGBcxx . . $ `src/main/color-conversion.h:99:9`!, 1, 0 |
| 383 | }, |
| 384 | /* Need to think this through a bit more -- rlk 20030712 */ |
| 385 | { |
| 386 | { |
| 387 | "InkLimit", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Ink Limit"), "Color=Yes,Category=Advanced Output Control", |
| 388 | N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Limit the total ink printed to the page"), |
| 389 | STP_PARAMETER_TYPE_DOUBLEcxx . . $ STP_PARAMETER_TYPE_DOUBLE., STP_PARAMETER_CLASS_OUTPUTcxx . . $ STP_PARAMETER_CLASS_OUTPUT., |
| 390 | STP_PARAMETER_LEVEL_ADVANCED4cxx . . $ STP_PARAMETER_LEVEL_ADVANCED4., 0, 1, -1, 0, 0 |
| 391 | }, 0.0, STP_CHANNEL_LIMITcxx . . $ `include/gutenprint/image.h:48:9`!, STP_CHANNEL_LIMITcxx . . $ `include/gutenprint/image.h:48:9`!, CMASK_CMYcxx . . $ `src/main/color-conversion.h:100:9`!, 0, -1 |
| 392 | }, |
| 393 | { |
| 394 | { |
| 395 | "BlackTrans", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("GCR Transition"), "Color=Yes,Category=Advanced Output Control", |
| 396 | N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Adjust the gray component transition rate"), |
| 397 | STP_PARAMETER_TYPE_DOUBLEcxx . . $ STP_PARAMETER_TYPE_DOUBLE., STP_PARAMETER_CLASS_OUTPUTcxx . . $ STP_PARAMETER_CLASS_OUTPUT., |
| 398 | STP_PARAMETER_LEVEL_ADVANCED4cxx . . $ STP_PARAMETER_LEVEL_ADVANCED4., 0, 1, 0, 1, 0 |
| 399 | }, 0.0, 1.0, 1.0, CMASK_Kcxx . . $ `src/main/color-conversion.h:74:9`!, 1, 0 |
| 400 | }, |
| 401 | { |
| 402 | { |
| 403 | "GCRLower", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("GCR Lower Bound"), "Color=Yes,Category=Advanced Output Control", |
| 404 | N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Lower bound of gray component reduction"), |
| 405 | STP_PARAMETER_TYPE_DOUBLEcxx . . $ STP_PARAMETER_TYPE_DOUBLE., STP_PARAMETER_CLASS_OUTPUTcxx . . $ STP_PARAMETER_CLASS_OUTPUT., |
| 406 | STP_PARAMETER_LEVEL_ADVANCED4cxx . . $ STP_PARAMETER_LEVEL_ADVANCED4., 0, 1, 0, 1, 0 |
| 407 | }, 0.0, 1.0, 0.2, CMASK_Kcxx . . $ `src/main/color-conversion.h:74:9`!, 1, 0 |
| 408 | }, |
| 409 | { |
| 410 | { |
| 411 | "GCRUpper", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("GCR Upper Bound"), "Color=Yes,Category=Advanced Output Control", |
| 412 | N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Upper bound of gray component reduction"), |
| 413 | STP_PARAMETER_TYPE_DOUBLEcxx . . $ STP_PARAMETER_TYPE_DOUBLE., STP_PARAMETER_CLASS_OUTPUTcxx . . $ STP_PARAMETER_CLASS_OUTPUT., |
| 414 | STP_PARAMETER_LEVEL_ADVANCED4cxx . . $ STP_PARAMETER_LEVEL_ADVANCED4., 0, 1, 0, 1, 0 |
| 415 | }, 0.0, 5.0, 0.5, CMASK_Kcxx . . $ `src/main/color-conversion.h:74:9`!, 1, 0 |
| 416 | }, |
| 417 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(0), |
| 418 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(1), |
| 419 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(2), |
| 420 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(3), |
| 421 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(4), |
| 422 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(5), |
| 423 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(6), |
| 424 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(7), |
| 425 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(8), |
| 426 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(9), |
| 427 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(10), |
| 428 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(11), |
| 429 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(12), |
| 430 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(13), |
| 431 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(14), |
| 432 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(15), |
| 433 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(16), |
| 434 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(17), |
| 435 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(18), |
| 436 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(19), |
| 437 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(20), |
| 438 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(21), |
| 439 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(22), |
| 440 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(23), |
| 441 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(24), |
| 442 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(25), |
| 443 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(26), |
| 444 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(27), |
| 445 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(28), |
| 446 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(29), |
| 447 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(30), |
| 448 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(31), |
| 449 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(32), |
| 450 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(33), |
| 451 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(34), |
| 452 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(35), |
| 453 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(36), |
| 454 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(37), |
| 455 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(38), |
| 456 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(39), |
| 457 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(40), |
| 458 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(41), |
| 459 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(42), |
| 460 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(43), |
| 461 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(44), |
| 462 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(45), |
| 463 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(46), |
| 464 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(47), |
| 465 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(48), |
| 466 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(49), |
| 467 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(50), |
| 468 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(51), |
| 469 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(52), |
| 470 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(53), |
| 471 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(54), |
| 472 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(55), |
| 473 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(56), |
| 474 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(57), |
| 475 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(58), |
| 476 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(59), |
| 477 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(60), |
| 478 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(61), |
| 479 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(62), |
| 480 | RAW_GAMMA_CHANNELcxx . . $ `src/main/print-color.c:192:9`!(63), |
| 481 | { |
| 482 | { |
| 483 | "LUTDumpFile", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("LUT dump file"), N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Advanced Output Control"), |
| 484 | N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Dump file for LUT for external color adjustment"), |
| 485 | STP_PARAMETER_TYPE_FILEcxx . . $ STP_PARAMETER_TYPE_FILE., STP_PARAMETER_CLASS_OUTPUTcxx . . $ STP_PARAMETER_CLASS_OUTPUT., |
| 486 | STP_PARAMETER_LEVEL_ADVANCED4cxx . . $ STP_PARAMETER_LEVEL_ADVANCED4., 0, 1, -1, 1, 0 |
| 487 | }, 0.0, 0.0, 0.0, CMASK_EVERYcxx . . $ `src/main/color-conversion.h:103:9`!, 0, -1 |
| 488 | }, |
| 489 | }; |
| 490 | |
| 491 | static const int float_parameter_countcxx . . $ float_parameter_count. = |
| 492 | sizeof(float_parameterscxx . . $ float_parameters.) / sizeof(float_param_tcxx . . $ float_param_t#); |
| 493 | |
| 494 | typedef structcxx . . $ $anonymous_type_edce4fe85e1ab4c7_1# |
| 495 | { |
| 496 | stp_parameter_tcxx . . $ stp_parameter_t# paramcxx . . $ $anonymous_type_edce4fe85e1ab4c7_1#param.; |
| 497 | stp_curve_tcxx . . $ stp_curve_t# **defvalcxx . . $ $anonymous_type_edce4fe85e1ab4c7_1#defval.; |
| 498 | unsigned channel_maskcxx . . $ $anonymous_type_edce4fe85e1ab4c7_1#channel_mask.; |
| 499 | int hsl_onlycxx . . $ $anonymous_type_edce4fe85e1ab4c7_1#hsl_only.; |
| 500 | int color_onlycxx . . $ $anonymous_type_edce4fe85e1ab4c7_1#color_only.; |
| 501 | int is_rgbcxx . . $ $anonymous_type_edce4fe85e1ab4c7_1#is_rgb.; |
| 502 | } curve_param_tcxx . . $ curve_param_t#; |
| 503 | |
| 504 | static int standard_curves_initializedcxx . . $ standard_curves_initialized. = 0; |
| 505 | |
| 506 | static stp_curve_tcxx . . $ stp_curve_t# *hue_map_boundscxx . . $ hue_map_bounds. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 507 | static stp_curve_tcxx . . $ stp_curve_t# *lum_map_boundscxx . . $ lum_map_bounds. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 508 | static stp_curve_tcxx . . $ stp_curve_t# *sat_map_boundscxx . . $ sat_map_bounds. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 509 | static stp_curve_tcxx . . $ stp_curve_t# *color_curve_boundscxx . . $ color_curve_bounds. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 510 | static stp_curve_tcxx . . $ stp_curve_t# *gcr_curve_boundscxx . . $ gcr_curve_bounds. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 511 | |
| 512 | |
| 513 | #define RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(channel) \ |
| 514 | { \ |
| 515 | { \ |
| 516 | "CurveCh" #channel, N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Channel " #channel " Curve"), \ |
| 517 | "Color=Yes,Category=Output Curves", \ |
| 518 | N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Curve for raw channel " #channel), \ |
| 519 | STP_PARAMETER_TYPE_CURVE, STP_PARAMETER_CLASS_OUTPUT, \ |
| 520 | STP_PARAMETER_LEVEL_INTERNAL, 0, 1, channel, 1, 0 \ |
| 521 | }, &color_curve_bounds, CMASK_RAWcxx . . $ `src/main/color-conversion.h:82:9`!, 0, 0, -1 \ |
| 522 | } |
| 523 | |
| 524 | static curve_param_tcxx . . $ curve_param_t# curve_parameterscxx . . $ curve_parameters.[] = |
| 525 | { |
| 526 | { |
| 527 | { |
| 528 | "CyanCurve", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Cyan Curve"), "Color=Yes,Category=Output Curves", |
| 529 | N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Cyan curve"), |
| 530 | STP_PARAMETER_TYPE_CURVEcxx . . $ STP_PARAMETER_TYPE_CURVE., STP_PARAMETER_CLASS_OUTPUTcxx . . $ STP_PARAMETER_CLASS_OUTPUT., |
| 531 | STP_PARAMETER_LEVEL_ADVANCED2cxx . . $ STP_PARAMETER_LEVEL_ADVANCED2., 0, 1, 1, 1, 0 |
| 532 | }, &color_curve_boundscxx . . $ color_curve_bounds., CMASK_Ccxx . . $ `src/main/color-conversion.h:75:9`!, 0, 1, 0 |
| 533 | }, |
| 534 | { |
| 535 | { |
| 536 | "MagentaCurve", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Magenta Curve"), "Color=Yes,Category=Output Curves", |
| 537 | N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Magenta curve"), |
| 538 | STP_PARAMETER_TYPE_CURVEcxx . . $ STP_PARAMETER_TYPE_CURVE., STP_PARAMETER_CLASS_OUTPUTcxx . . $ STP_PARAMETER_CLASS_OUTPUT., |
| 539 | STP_PARAMETER_LEVEL_ADVANCED2cxx . . $ STP_PARAMETER_LEVEL_ADVANCED2., 0, 1, 2, 1, 0 |
| 540 | }, &color_curve_boundscxx . . $ color_curve_bounds., CMASK_Mcxx . . $ `src/main/color-conversion.h:76:9`!, 0, 1, 0 |
| 541 | }, |
| 542 | { |
| 543 | { |
| 544 | "YellowCurve", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Yellow Curve"), "Color=Yes,Category=Output Curves", |
| 545 | N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Yellow curve"), |
| 546 | STP_PARAMETER_TYPE_CURVEcxx . . $ STP_PARAMETER_TYPE_CURVE., STP_PARAMETER_CLASS_OUTPUTcxx . . $ STP_PARAMETER_CLASS_OUTPUT., |
| 547 | STP_PARAMETER_LEVEL_ADVANCED2cxx . . $ STP_PARAMETER_LEVEL_ADVANCED2., 0, 1, 3, 1, 0 |
| 548 | }, &color_curve_boundscxx . . $ color_curve_bounds., CMASK_Ycxx . . $ `src/main/color-conversion.h:77:9`!, 0, 1, 0 |
| 549 | }, |
| 550 | { |
| 551 | { |
| 552 | "BlackCurve", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Black Curve"), "Color=Yes,Category=Output Curves", |
| 553 | N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Black curve"), |
| 554 | STP_PARAMETER_TYPE_CURVEcxx . . $ STP_PARAMETER_TYPE_CURVE., STP_PARAMETER_CLASS_OUTPUTcxx . . $ STP_PARAMETER_CLASS_OUTPUT., |
| 555 | STP_PARAMETER_LEVEL_ADVANCED2cxx . . $ STP_PARAMETER_LEVEL_ADVANCED2., 0, 1, 0, 1, 0 |
| 556 | }, &color_curve_boundscxx . . $ color_curve_bounds., CMASK_Kcxx . . $ `src/main/color-conversion.h:74:9`!, 0, 0, 0 |
| 557 | }, |
| 558 | { |
| 559 | { |
| 560 | "RedCurve", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Red Curve"), "Color=Yes,Category=Output Curves", |
| 561 | N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Red curve"), |
| 562 | STP_PARAMETER_TYPE_CURVEcxx . . $ STP_PARAMETER_TYPE_CURVE., STP_PARAMETER_CLASS_OUTPUTcxx . . $ STP_PARAMETER_CLASS_OUTPUT., |
| 563 | STP_PARAMETER_LEVEL_ADVANCED2cxx . . $ STP_PARAMETER_LEVEL_ADVANCED2., 0, 1, 1, 1, 0 |
| 564 | }, &color_curve_boundscxx . . $ color_curve_bounds., CMASK_Ccxx . . $ `src/main/color-conversion.h:75:9`!, 0, 1, 1 |
| 565 | }, |
| 566 | { |
| 567 | { |
| 568 | "GreenCurve", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Green Curve"), "Color=Yes,Category=Output Curves", |
| 569 | N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Green curve"), |
| 570 | STP_PARAMETER_TYPE_CURVEcxx . . $ STP_PARAMETER_TYPE_CURVE., STP_PARAMETER_CLASS_OUTPUTcxx . . $ STP_PARAMETER_CLASS_OUTPUT., |
| 571 | STP_PARAMETER_LEVEL_ADVANCED2cxx . . $ STP_PARAMETER_LEVEL_ADVANCED2., 0, 1, 2, 1, 0 |
| 572 | }, &color_curve_boundscxx . . $ color_curve_bounds., CMASK_Mcxx . . $ `src/main/color-conversion.h:76:9`!, 0, 1, 1 |
| 573 | }, |
| 574 | { |
| 575 | { |
| 576 | "BlueCurve", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Blue Curve"), "Color=Yes,Category=Output Curves", |
| 577 | N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Blue curve"), |
| 578 | STP_PARAMETER_TYPE_CURVEcxx . . $ STP_PARAMETER_TYPE_CURVE., STP_PARAMETER_CLASS_OUTPUTcxx . . $ STP_PARAMETER_CLASS_OUTPUT., |
| 579 | STP_PARAMETER_LEVEL_ADVANCED2cxx . . $ STP_PARAMETER_LEVEL_ADVANCED2., 0, 1, 3, 1, 0 |
| 580 | }, &color_curve_boundscxx . . $ color_curve_bounds., CMASK_Ycxx . . $ `src/main/color-conversion.h:77:9`!, 0, 1, 1 |
| 581 | }, |
| 582 | { |
| 583 | { |
| 584 | "WhiteCurve", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("White Curve"), "Color=Yes,Category=Output Curves", |
| 585 | N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("White curve"), |
| 586 | STP_PARAMETER_TYPE_CURVEcxx . . $ STP_PARAMETER_TYPE_CURVE., STP_PARAMETER_CLASS_OUTPUTcxx . . $ STP_PARAMETER_CLASS_OUTPUT., |
| 587 | STP_PARAMETER_LEVEL_ADVANCED2cxx . . $ STP_PARAMETER_LEVEL_ADVANCED2., 0, 1, 1, 1, 0 |
| 588 | }, &color_curve_boundscxx . . $ color_curve_bounds., CMASK_Wcxx . . $ `src/main/color-conversion.h:78:9`!, 0, 0, 1 |
| 589 | }, |
| 590 | { |
| 591 | { |
| 592 | "HueMap", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Hue Map"), "Color=Yes,Category=Advanced HSL Curves", |
| 593 | N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Hue adjustment curve"), |
| 594 | STP_PARAMETER_TYPE_CURVEcxx . . $ STP_PARAMETER_TYPE_CURVE., STP_PARAMETER_CLASS_OUTPUTcxx . . $ STP_PARAMETER_CLASS_OUTPUT., |
| 595 | STP_PARAMETER_LEVEL_ADVANCED3cxx . . $ STP_PARAMETER_LEVEL_ADVANCED3., 0, 1, -1, 1, 0 |
| 596 | }, &hue_map_boundscxx . . $ hue_map_bounds., CMASK_CMYcxx . . $ `src/main/color-conversion.h:100:9`! | CMASK_RGBcxx . . $ `src/main/color-conversion.h:99:9`!, 1, 1, -1 |
| 597 | }, |
| 598 | { |
| 599 | { |
| 600 | "SatMap", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Saturation Map"), "Color=Yes,Category=Advanced HSL Curves", |
| 601 | N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Saturation adjustment curve"), |
| 602 | STP_PARAMETER_TYPE_CURVEcxx . . $ STP_PARAMETER_TYPE_CURVE., STP_PARAMETER_CLASS_OUTPUTcxx . . $ STP_PARAMETER_CLASS_OUTPUT., |
| 603 | STP_PARAMETER_LEVEL_ADVANCED3cxx . . $ STP_PARAMETER_LEVEL_ADVANCED3., 0, 1, -1, 1, 0 |
| 604 | }, &sat_map_boundscxx . . $ sat_map_bounds., CMASK_CMYcxx . . $ `src/main/color-conversion.h:100:9`! | CMASK_RGBcxx . . $ `src/main/color-conversion.h:99:9`!, 1, 1, -1 |
| 605 | }, |
| 606 | { |
| 607 | { |
| 608 | "LumMap", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Luminosity Map"), "Color=Yes,Category=Advanced HSL Curves", |
| 609 | N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Luminosity adjustment curve"), |
| 610 | STP_PARAMETER_TYPE_CURVEcxx . . $ STP_PARAMETER_TYPE_CURVE., STP_PARAMETER_CLASS_OUTPUTcxx . . $ STP_PARAMETER_CLASS_OUTPUT., |
| 611 | STP_PARAMETER_LEVEL_ADVANCED3cxx . . $ STP_PARAMETER_LEVEL_ADVANCED3., 0, 1, -1, 1, 0 |
| 612 | }, &lum_map_boundscxx . . $ lum_map_bounds., CMASK_CMYcxx . . $ `src/main/color-conversion.h:100:9`! | CMASK_RGBcxx . . $ `src/main/color-conversion.h:99:9`!, 1, 1, -1 |
| 613 | }, |
| 614 | { |
| 615 | { |
| 616 | "GCRCurve", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Gray Component Reduction"), "Color=Yes,Category=Advanced Output Control", |
| 617 | N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Gray component reduction curve"), |
| 618 | STP_PARAMETER_TYPE_CURVEcxx . . $ STP_PARAMETER_TYPE_CURVE., STP_PARAMETER_CLASS_OUTPUTcxx . . $ STP_PARAMETER_CLASS_OUTPUT., |
| 619 | STP_PARAMETER_LEVEL_ADVANCED4cxx . . $ STP_PARAMETER_LEVEL_ADVANCED4., 0, 1, 0, 1, 0 |
| 620 | }, &gcr_curve_boundscxx . . $ gcr_curve_bounds., CMASK_Kcxx . . $ `src/main/color-conversion.h:74:9`!, 0, 1, -1 |
| 621 | }, |
| 622 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(0), |
| 623 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(1), |
| 624 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(2), |
| 625 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(3), |
| 626 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(4), |
| 627 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(5), |
| 628 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(6), |
| 629 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(7), |
| 630 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(8), |
| 631 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(9), |
| 632 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(10), |
| 633 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(11), |
| 634 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(12), |
| 635 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(13), |
| 636 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(14), |
| 637 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(15), |
| 638 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(16), |
| 639 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(17), |
| 640 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(18), |
| 641 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(19), |
| 642 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(20), |
| 643 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(21), |
| 644 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(22), |
| 645 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(23), |
| 646 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(24), |
| 647 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(25), |
| 648 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(26), |
| 649 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(27), |
| 650 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(28), |
| 651 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(29), |
| 652 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(30), |
| 653 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(31), |
| 654 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(32), |
| 655 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(33), |
| 656 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(34), |
| 657 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(35), |
| 658 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(36), |
| 659 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(37), |
| 660 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(38), |
| 661 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(39), |
| 662 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(40), |
| 663 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(41), |
| 664 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(42), |
| 665 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(43), |
| 666 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(44), |
| 667 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(45), |
| 668 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(46), |
| 669 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(47), |
| 670 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(48), |
| 671 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(49), |
| 672 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(50), |
| 673 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(51), |
| 674 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(52), |
| 675 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(53), |
| 676 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(54), |
| 677 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(55), |
| 678 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(56), |
| 679 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(57), |
| 680 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(58), |
| 681 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(59), |
| 682 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(60), |
| 683 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(61), |
| 684 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(62), |
| 685 | RAW_CURVE_CHANNELcxx . . $ `src/main/print-color.c:513:9`!(63), |
| 686 | }; |
| 687 | |
| 688 | static const int curve_parameter_countcxx . . $ curve_parameter_count. = |
| 689 | sizeof(curve_parameterscxx . . $ curve_parameters.) / sizeof(curve_param_tcxx . . $ curve_param_t#); |
| 690 | |
| 691 | |
| 692 | static const color_description_tcxx . . $ color_description_t# * |
| 693 | get_color_descriptioncxx . . $ get_color_description(f61840fb2058e480).(const char *name) |
| 694 | { |
| 695 | unsigned int i; |
| 696 | if (name) |
| 697 | for (i = 0; i < color_description_countcxx . . $ color_description_count.; i++) |
| 698 | { |
| 699 | if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(name, color_descriptionscxx . . $ color_descriptions.[i].namecxx . . $ $anonymous_type_b1e744064c9709f4_5#name.) == 0) |
| 700 | return &(color_descriptionscxx . . $ color_descriptions.[i]); |
| 701 | } |
| 702 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 703 | } |
| 704 | |
| 705 | static const channel_depth_tcxx . . $ channel_depth_t# * |
| 706 | get_channel_depthcxx . . $ get_channel_depth(ddd3aef4da13bea5).(const char *name) |
| 707 | { |
| 708 | unsigned int i; |
| 709 | if (name) |
| 710 | for (i = 0; i < channel_depth_countcxx . . $ channel_depth_count.; i++) |
| 711 | { |
| 712 | if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(name, channel_depthscxx . . $ channel_depths.[i].namecxx . . $ $anonymous_type_b1e744064c9709f4_6#name.) == 0) |
| 713 | return &(channel_depthscxx . . $ channel_depths.[i]); |
| 714 | } |
| 715 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 716 | } |
| 717 | |
| 718 | static const color_correction_tcxx . . $ color_correction_t# * |
| 719 | get_color_correctioncxx . . $ get_color_correction(2e72bd2e7c2093d6).(const char *name) |
| 720 | { |
| 721 | unsigned int i; |
| 722 | if (name) |
| 723 | for (i = 0; i < color_correction_countcxx . . $ color_correction_count.; i++) |
| 724 | { |
| 725 | if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(name, color_correctionscxx . . $ color_corrections.[i].namecxx . . $ $anonymous_type_b1e744064c9709f4_1#name.) == 0) |
| 726 | return &(color_correctionscxx . . $ color_corrections.[i]); |
| 727 | } |
| 728 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 729 | } |
| 730 | |
| 731 | static const color_correction_tcxx . . $ color_correction_t# * |
| 732 | get_color_correction_by_tagcxx . . $ get_color_correction_by_tag(61c60195be480a6e).(color_correction_enum_tcxx . . $ color_correction_enum_t# correction) |
| 733 | { |
| 734 | unsigned int i; |
| 735 | for (i = 0; i < color_correction_countcxx . . $ color_correction_count.; i++) |
| 736 | { |
| 737 | if (correction == color_correctionscxx . . $ color_corrections.[i].correctioncxx . . $ $anonymous_type_b1e744064c9709f4_1#correction.) |
| 738 | return &(color_correctionscxx . . $ color_corrections.[i]); |
| 739 | } |
| 740 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 741 | } |
| 742 | |
| 743 | |
| 744 | static void |
| 745 | initialize_channelscxx . . $ initialize_channels(40c2c4844a792f0b).(stp_vars_tcxx . . $ stp_vars_t# *v, stp_image_tcxx . . $ stp_image_t# *image) |
| 746 | { |
| 747 | lut_tcxx . . $ lut_t# *lut = (lut_tcxx . . $ lut_t# *)(stp_get_component_datacxx . . $ stp_get_component_data(2bc0070dfdce2f04).(v, "Color")); |
| 748 | if (stp_check_float_parametercxx . . $ stp_check_float_parameter(cff2817d3dcc2695).(v, "InkLimit", STP_PARAMETER_ACTIVEcxx . . $ STP_PARAMETER_ACTIVE.)) |
| 749 | stp_channel_set_ink_limitcxx . . $ stp_channel_set_ink_limit(8ce3003bda9b93be).(v, stp_get_float_parametercxx . . $ stp_get_float_parameter(ac3b1c02c916f219).(v, "InkLimit")); |
| 750 | stp_channel_initializecxx . . $ stp_channel_initialize(45288e809198728).(v, image, lut->out_channelscxx . . $ $anonymous_type_b1e744064c9709f4_7#out_channels.); |
| 751 | lut->channels_are_initializedcxx . . $ $anonymous_type_b1e744064c9709f4_7#channels_are_initialized. = 1; |
| 752 | } |
| 753 | |
| 754 | static int |
| 755 | stpi_color_traditional_get_rowcxx . . $ stpi_color_traditional_get_row(ba7b466a9562988e).(stp_vars_tcxx . . $ stp_vars_t# *v, |
| 756 | stp_image_tcxx . . $ stp_image_t# *image, |
| 757 | int row, |
| 758 | unsigned *zero_mask) |
| 759 | { |
| 760 | const lut_tcxx . . $ lut_t# *lut = (const lut_tcxx . . $ lut_t# *)(stp_get_component_datacxx . . $ stp_get_component_data(2bc0070dfdce2f04).(v, "Color")); |
| 761 | unsigned zero; |
| 762 | if (stp_image_get_rowcxx . . $ stp_image_get_row(c6bbe34ec0bddcf0).(image, lut->in_datacxx . . $ $anonymous_type_b1e744064c9709f4_7#in_data., |
| 763 | lut->image_widthcxx . . $ $anonymous_type_b1e744064c9709f4_7#image_width. * lut->in_channelscxx . . $ $anonymous_type_b1e744064c9709f4_7#in_channels. * lut->channel_depthcxx . . $ $anonymous_type_b1e744064c9709f4_7#channel_depth. / 8, row) |
| 764 | != STP_IMAGE_STATUS_OKcxx . . $ STP_IMAGE_STATUS_OK.) |
| 765 | return 2; |
| 766 | if (!lut->channels_are_initializedcxx . . $ $anonymous_type_b1e744064c9709f4_7#channels_are_initialized.) |
| 767 | initialize_channelscxx . . $ initialize_channels(40c2c4844a792f0b).(v, image); |
| 768 | zero = (lut->output_color_descriptioncxx . . $ $anonymous_type_b1e744064c9709f4_7#output_color_description.->conversion_functioncxx . . $ $anonymous_type_b1e744064c9709f4_5#conversion_function.) |
| 769 | (v, lut->in_datacxx . . $ $anonymous_type_b1e744064c9709f4_7#in_data., stp_channel_get_inputcxx . . $ stp_channel_get_input(58f317534f8c8659).(v)); |
| 770 | if (zero_mask) |
| 771 | *zero_mask = zero; |
| 772 | stp_channel_convertcxx . . $ stp_channel_convert(b3214fa935baae0b).(v, zero_mask); |
| 773 | return 0; |
| 774 | } |
| 775 | |
| 776 | static void |
| 777 | free_channelscxx . . $ free_channels(f54558fb50178cf3).(lut_tcxx . . $ lut_t# *lut) |
| 778 | { |
| 779 | int i; |
| 780 | for (i = 0; i < STP_CHANNEL_LIMITcxx . . $ `include/gutenprint/image.h:48:9`!; i++) |
| 781 | stp_curve_free_curve_cachecxx . . $ stp_curve_free_curve_cache(acd0198871977558).(&(lut->channel_curvescxx . . $ $anonymous_type_b1e744064c9709f4_7#channel_curves.[i])); |
| 782 | } |
| 783 | |
| 784 | static lut_tcxx . . $ lut_t# * |
| 785 | allocate_lutcxx . . $ allocate_lut(3659397ce926397).(void) |
| 786 | { |
| 787 | int i; |
| 788 | lut_tcxx . . $ lut_t# *ret = stp_zalloccxx . . $ stp_zalloc(bfcfa4d6b7f7ef64).(sizeof(lut_tcxx . . $ lut_t#)); |
| 789 | for (i = 0; i < STP_CHANNEL_LIMITcxx . . $ `include/gutenprint/image.h:48:9`!; i++) |
| 790 | { |
| 791 | ret->gamma_valuescxx . . $ $anonymous_type_b1e744064c9709f4_7#gamma_values.[i] = 1.0; |
| 792 | } |
| 793 | ret->print_gammacxx . . $ $anonymous_type_b1e744064c9709f4_7#print_gamma. = 1.0; |
| 794 | ret->app_gammacxx . . $ $anonymous_type_b1e744064c9709f4_7#app_gamma. = 1.0; |
| 795 | ret->contrastcxx . . $ $anonymous_type_b1e744064c9709f4_7#contrast. = 1.0; |
| 796 | ret->brightnesscxx . . $ $anonymous_type_b1e744064c9709f4_7#brightness. = 1.0; |
| 797 | ret->simple_gamma_correctioncxx . . $ $anonymous_type_b1e744064c9709f4_7#simple_gamma_correction. = 0; |
| 798 | return ret; |
| 799 | } |
| 800 | |
| 801 | static void * |
| 802 | copy_lutcxx . . $ copy_lut(9f162e79bfc6c74).(void *vlut) |
| 803 | { |
| 804 | const lut_tcxx . . $ lut_t# *src = (const lut_tcxx . . $ lut_t# *)vlut; |
| 805 | int i; |
| 806 | lut_tcxx . . $ lut_t# *dest; |
| 807 | if (!src) |
| 808 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 809 | dest = allocate_lutcxx . . $ allocate_lut(3659397ce926397).(); |
| 810 | free_channelscxx . . $ free_channels(f54558fb50178cf3).(dest); |
| 811 | |
| 812 | dest->stepscxx . . $ $anonymous_type_b1e744064c9709f4_7#steps. = src->stepscxx . . $ $anonymous_type_b1e744064c9709f4_7#steps.; |
| 813 | dest->channel_depthcxx . . $ $anonymous_type_b1e744064c9709f4_7#channel_depth. = src->channel_depthcxx . . $ $anonymous_type_b1e744064c9709f4_7#channel_depth.; |
| 814 | dest->image_widthcxx . . $ $anonymous_type_b1e744064c9709f4_7#image_width. = src->image_widthcxx . . $ $anonymous_type_b1e744064c9709f4_7#image_width.; |
| 815 | dest->in_channelscxx . . $ $anonymous_type_b1e744064c9709f4_7#in_channels. = src->in_channelscxx . . $ $anonymous_type_b1e744064c9709f4_7#in_channels.; |
| 816 | dest->out_channelscxx . . $ $anonymous_type_b1e744064c9709f4_7#out_channels. = src->out_channelscxx . . $ $anonymous_type_b1e744064c9709f4_7#out_channels.; |
| 817 | /* Don't copy channels_are_initialized */ |
| 818 | dest->invert_outputcxx . . $ $anonymous_type_b1e744064c9709f4_7#invert_output. = src->invert_outputcxx . . $ $anonymous_type_b1e744064c9709f4_7#invert_output.; |
| 819 | dest->input_color_descriptioncxx . . $ $anonymous_type_b1e744064c9709f4_7#input_color_description. = src->input_color_descriptioncxx . . $ $anonymous_type_b1e744064c9709f4_7#input_color_description.; |
| 820 | dest->output_color_descriptioncxx . . $ $anonymous_type_b1e744064c9709f4_7#output_color_description. = src->output_color_descriptioncxx . . $ $anonymous_type_b1e744064c9709f4_7#output_color_description.; |
| 821 | dest->color_correctioncxx . . $ $anonymous_type_b1e744064c9709f4_7#color_correction. = src->color_correctioncxx . . $ $anonymous_type_b1e744064c9709f4_7#color_correction.; |
| 822 | for (i = 0; i < STP_CHANNEL_LIMITcxx . . $ `include/gutenprint/image.h:48:9`!; i++) |
| 823 | { |
| 824 | stp_curve_cache_copycxx . . $ stp_curve_cache_copy(dbdf3b6f7b20c1ad).(&(dest->channel_curvescxx . . $ $anonymous_type_b1e744064c9709f4_7#channel_curves.[i]), &(src->channel_curvescxx . . $ $anonymous_type_b1e744064c9709f4_7#channel_curves.[i])); |
| 825 | dest->gamma_valuescxx . . $ $anonymous_type_b1e744064c9709f4_7#gamma_values.[i] = src->gamma_valuescxx . . $ $anonymous_type_b1e744064c9709f4_7#gamma_values.[i]; |
| 826 | } |
| 827 | stp_curve_cache_copycxx . . $ stp_curve_cache_copy(dbdf3b6f7b20c1ad).(&(dest->brightness_correctioncxx . . $ $anonymous_type_b1e744064c9709f4_7#brightness_correction.), |
| 828 | &(src->brightness_correctioncxx . . $ $anonymous_type_b1e744064c9709f4_7#brightness_correction.)); |
| 829 | stp_curve_cache_copycxx . . $ stp_curve_cache_copy(dbdf3b6f7b20c1ad).(&(dest->contrast_correctioncxx . . $ $anonymous_type_b1e744064c9709f4_7#contrast_correction.), |
| 830 | &(src->contrast_correctioncxx . . $ $anonymous_type_b1e744064c9709f4_7#contrast_correction.)); |
| 831 | stp_curve_cache_copycxx . . $ stp_curve_cache_copy(dbdf3b6f7b20c1ad).(&(dest->user_color_correctioncxx . . $ $anonymous_type_b1e744064c9709f4_7#user_color_correction.), |
| 832 | &(src->user_color_correctioncxx . . $ $anonymous_type_b1e744064c9709f4_7#user_color_correction.)); |
| 833 | dest->print_gammacxx . . $ $anonymous_type_b1e744064c9709f4_7#print_gamma. = src->print_gammacxx . . $ $anonymous_type_b1e744064c9709f4_7#print_gamma.; |
| 834 | dest->app_gammacxx . . $ $anonymous_type_b1e744064c9709f4_7#app_gamma. = src->app_gammacxx . . $ $anonymous_type_b1e744064c9709f4_7#app_gamma.; |
| 835 | dest->screen_gammacxx . . $ $anonymous_type_b1e744064c9709f4_7#screen_gamma. = src->screen_gammacxx . . $ $anonymous_type_b1e744064c9709f4_7#screen_gamma.; |
| 836 | dest->contrastcxx . . $ $anonymous_type_b1e744064c9709f4_7#contrast. = src->contrastcxx . . $ $anonymous_type_b1e744064c9709f4_7#contrast.; |
| 837 | dest->brightnesscxx . . $ $anonymous_type_b1e744064c9709f4_7#brightness. = src->brightnesscxx . . $ $anonymous_type_b1e744064c9709f4_7#brightness.; |
| 838 | dest->simple_gamma_correctioncxx . . $ $anonymous_type_b1e744064c9709f4_7#simple_gamma_correction. = src->simple_gamma_correctioncxx . . $ $anonymous_type_b1e744064c9709f4_7#simple_gamma_correction.; |
| 839 | dest->linear_contrast_adjustmentcxx . . $ $anonymous_type_b1e744064c9709f4_7#linear_contrast_adjustment. = src->linear_contrast_adjustmentcxx . . $ $anonymous_type_b1e744064c9709f4_7#linear_contrast_adjustment.; |
| 840 | stp_curve_cache_copycxx . . $ stp_curve_cache_copy(dbdf3b6f7b20c1ad).(&(dest->hue_mapcxx . . $ $anonymous_type_b1e744064c9709f4_7#hue_map.), &(src->hue_mapcxx . . $ $anonymous_type_b1e744064c9709f4_7#hue_map.)); |
| 841 | stp_curve_cache_copycxx . . $ stp_curve_cache_copy(dbdf3b6f7b20c1ad).(&(dest->lum_mapcxx . . $ $anonymous_type_b1e744064c9709f4_7#lum_map.), &(src->lum_mapcxx . . $ $anonymous_type_b1e744064c9709f4_7#lum_map.)); |
| 842 | stp_curve_cache_copycxx . . $ stp_curve_cache_copy(dbdf3b6f7b20c1ad).(&(dest->sat_mapcxx . . $ $anonymous_type_b1e744064c9709f4_7#sat_map.), &(src->sat_mapcxx . . $ $anonymous_type_b1e744064c9709f4_7#sat_map.)); |
| 843 | /* Don't copy gray_tmp */ |
| 844 | /* Don't copy cmy_tmp */ |
| 845 | if (src->in_datacxx . . $ $anonymous_type_b1e744064c9709f4_7#in_data.) |
| 846 | { |
| 847 | dest->in_datacxx . . $ $anonymous_type_b1e744064c9709f4_7#in_data. = stp_malloccxx . . $ stp_malloc(bfcfa4d6b7f7ef64).(src->image_widthcxx . . $ $anonymous_type_b1e744064c9709f4_7#image_width. * src->in_channelscxx . . $ $anonymous_type_b1e744064c9709f4_7#in_channels.); |
| 848 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(dest->in_datacxx . . $ $anonymous_type_b1e744064c9709f4_7#in_data., 0, src->image_widthcxx . . $ $anonymous_type_b1e744064c9709f4_7#image_width. * src->in_channelscxx . . $ $anonymous_type_b1e744064c9709f4_7#in_channels.); |
| 849 | } |
| 850 | return dest; |
| 851 | } |
| 852 | |
| 853 | static void |
| 854 | free_lutcxx . . $ free_lut(5d22bdacc48458e8).(void *vlut) |
| 855 | { |
| 856 | lut_tcxx . . $ lut_t# *lut = (lut_tcxx . . $ lut_t# *)vlut; |
| 857 | free_channelscxx . . $ free_channels(f54558fb50178cf3).(lut); |
| 858 | stp_curve_free_curve_cachecxx . . $ stp_curve_free_curve_cache(acd0198871977558).(&(lut->brightness_correctioncxx . . $ $anonymous_type_b1e744064c9709f4_7#brightness_correction.)); |
| 859 | stp_curve_free_curve_cachecxx . . $ stp_curve_free_curve_cache(acd0198871977558).(&(lut->contrast_correctioncxx . . $ $anonymous_type_b1e744064c9709f4_7#contrast_correction.)); |
| 860 | stp_curve_free_curve_cachecxx . . $ stp_curve_free_curve_cache(acd0198871977558).(&(lut->user_color_correctioncxx . . $ $anonymous_type_b1e744064c9709f4_7#user_color_correction.)); |
| 861 | stp_curve_free_curve_cachecxx . . $ stp_curve_free_curve_cache(acd0198871977558).(&(lut->hue_mapcxx . . $ $anonymous_type_b1e744064c9709f4_7#hue_map.)); |
| 862 | stp_curve_free_curve_cachecxx . . $ stp_curve_free_curve_cache(acd0198871977558).(&(lut->lum_mapcxx . . $ $anonymous_type_b1e744064c9709f4_7#lum_map.)); |
| 863 | stp_curve_free_curve_cachecxx . . $ stp_curve_free_curve_cache(acd0198871977558).(&(lut->sat_mapcxx . . $ $anonymous_type_b1e744064c9709f4_7#sat_map.)); |
| 864 | STP_SAFE_FREEcxx . . $ `include/gutenprint/util.h:210:9`!(lut->gray_tmp); |
| 865 | STP_SAFE_FREEcxx . . $ `include/gutenprint/util.h:210:9`!(lut->cmy_tmp); |
| 866 | STP_SAFE_FREEcxx . . $ `include/gutenprint/util.h:210:9`!(lut->in_data); |
| 867 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(lut, 0, sizeof(lut_tcxx . . $ lut_t#)); |
| 868 | stp_freecxx . . $ stp_free(5d22bdacc48458e8).(lut); |
| 869 | } |
| 870 | |
| 871 | static stp_curve_tcxx . . $ stp_curve_t# * |
| 872 | compute_gcr_curvecxx . . $ compute_gcr_curve(2942fb0b2cf2e343).(const stp_vars_tcxx . . $ stp_vars_t# *vars) |
| 873 | { |
| 874 | stp_curve_tcxx . . $ stp_curve_t# *curve; |
| 875 | lut_tcxx . . $ lut_t# *lut = (lut_tcxx . . $ lut_t# *)(stp_get_component_datacxx . . $ stp_get_component_data(2bc0070dfdce2f04).(vars, "Color")); |
| 876 | double k_lower = 0.0; |
| 877 | double k_upper = 1.0; |
| 878 | double k_trans = 1.0; |
| 879 | double i_k_trans = 1.0; |
| 880 | double *tmp_data = stp_malloccxx . . $ stp_malloc(bfcfa4d6b7f7ef64).(sizeof(double) * lut->stepscxx . . $ $anonymous_type_b1e744064c9709f4_7#steps.); |
| 881 | unsigned int i; |
| 882 | |
| 883 | if (stp_check_float_parametercxx . . $ stp_check_float_parameter(cff2817d3dcc2695).(vars, "GCRUpper", STP_PARAMETER_DEFAULTEDcxx . . $ STP_PARAMETER_DEFAULTED.)) |
| 884 | k_upper = stp_get_float_parametercxx . . $ stp_get_float_parameter(ac3b1c02c916f219).(vars, "GCRUpper"); |
| 885 | if (stp_check_float_parametercxx . . $ stp_check_float_parameter(cff2817d3dcc2695).(vars, "GCRLower", STP_PARAMETER_DEFAULTEDcxx . . $ STP_PARAMETER_DEFAULTED.)) |
| 886 | k_lower = stp_get_float_parametercxx . . $ stp_get_float_parameter(ac3b1c02c916f219).(vars, "GCRLower"); |
| 887 | if (stp_check_float_parametercxx . . $ stp_check_float_parameter(cff2817d3dcc2695).(vars, "BlackTrans", STP_PARAMETER_DEFAULTEDcxx . . $ STP_PARAMETER_DEFAULTED.)) |
| 888 | k_trans = stp_get_float_parametercxx . . $ stp_get_float_parameter(ac3b1c02c916f219).(vars, "BlackTrans"); |
| 889 | if (k_lower >= 1) |
| 890 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 891 | k_upper *= lut->stepscxx . . $ $anonymous_type_b1e744064c9709f4_7#steps.; |
| 892 | k_lower *= lut->stepscxx . . $ $anonymous_type_b1e744064c9709f4_7#steps.; |
| 893 | stp_dprintfcxx . . $ stp_dprintf(13526ca24396f6ac).(STP_DBG_LUTcxx . . $ `include/gutenprint/util.h:166:9`!, vars, " k_lower %.3f\n", k_lower); |
| 894 | stp_dprintfcxx . . $ stp_dprintf(13526ca24396f6ac).(STP_DBG_LUTcxx . . $ `include/gutenprint/util.h:166:9`!, vars, " k_upper %.3f\n", k_upper); |
| 895 | |
| 896 | if (k_lower > lut->stepscxx . . $ $anonymous_type_b1e744064c9709f4_7#steps.) |
| 897 | k_lower = lut->stepscxx . . $ $anonymous_type_b1e744064c9709f4_7#steps.; |
| 898 | if (k_upper < k_lower) |
| 899 | k_upper = k_lower + 1; |
| 900 | i_k_trans = 1.0 / k_trans; |
| 901 | |
| 902 | for (i = 0; i < k_lower; i ++) |
| 903 | tmp_data[i] = 0; |
| 904 | if (k_upper < lut->stepscxx . . $ $anonymous_type_b1e744064c9709f4_7#steps.) |
| 905 | { |
| 906 | for (i = ceil(k_lower); i < k_upper; i ++) |
| 907 | { |
| 908 | double where = (i - k_lower) / (k_upper - k_lower); |
| 909 | double g1 = pow(where, i_k_trans); |
| 910 | double g2 = 1.0 - pow(1.0 - where, k_trans); |
| 911 | double value = (i_k_trans <= 1.0 ? g1 : g2); |
| 912 | tmp_data[i] = 65535.0 * k_upper * value / (double) (lut->stepscxx . . $ $anonymous_type_b1e744064c9709f4_7#steps. - 1); |
| 913 | tmp_data[i] = floor(tmp_data[i] + .5); |
| 914 | } |
| 915 | for (i = ceil(k_upper); i < lut->stepscxx . . $ $anonymous_type_b1e744064c9709f4_7#steps.; i ++) |
| 916 | tmp_data[i] = 65535.0 * i / (double) (lut->stepscxx . . $ $anonymous_type_b1e744064c9709f4_7#steps. - 1); |
| 917 | } |
| 918 | else if (k_lower < lut->stepscxx . . $ $anonymous_type_b1e744064c9709f4_7#steps.) |
| 919 | for (i = ceil(k_lower); i < lut->stepscxx . . $ $anonymous_type_b1e744064c9709f4_7#steps.; i ++) |
| 920 | { |
| 921 | double where = (i - k_lower) / (k_upper - k_lower); |
| 922 | double g1 = pow(where, i_k_trans); |
| 923 | double g2 = 1.0 - pow(1.0 - where, k_trans); |
| 924 | double value = (i_k_trans <= 1.0 ? g1 : g2); |
| 925 | tmp_data[i] = 65535.0 * lut->stepscxx . . $ $anonymous_type_b1e744064c9709f4_7#steps. * value / (double) (lut->stepscxx . . $ $anonymous_type_b1e744064c9709f4_7#steps. - 1); |
| 926 | tmp_data[i] = floor(tmp_data[i] + .5); |
| 927 | } |
| 928 | curve = stp_curve_createcxx . . $ stp_curve_create(37ed35325dc8f7a1).(STP_CURVE_WRAP_NONEcxx . . $ STP_CURVE_WRAP_NONE.); |
| 929 | stp_curve_set_boundscxx . . $ stp_curve_set_bounds(758f5ad7a073d1f3).(curve, 0, 65535); |
| 930 | STPI_ASSERTcxx . . $ `src/main/gutenprint-internal.h:58:9`!(stp_curve_set_data(curve, lut->steps, tmp_data), vars); |
| 931 | stp_freecxx . . $ stp_free(5d22bdacc48458e8).(tmp_data); |
| 932 | return curve; |
| 933 | } |
| 934 | |
| 935 | static void |
| 936 | initialize_gcr_curvecxx . . $ initialize_gcr_curve(1a97b8462f9f913c).(stp_vars_tcxx . . $ stp_vars_t# *vars) |
| 937 | { |
| 938 | lut_tcxx . . $ lut_t# *lut = (lut_tcxx . . $ lut_t# *)(stp_get_component_datacxx . . $ stp_get_component_data(2bc0070dfdce2f04).(vars, "Color")); |
| 939 | stp_curve_tcxx . . $ stp_curve_t# *curve = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 940 | if (stp_check_curve_parametercxx . . $ stp_check_curve_parameter(cff2817d3dcc2695).(vars, "GCRCurve", STP_PARAMETER_DEFAULTEDcxx . . $ STP_PARAMETER_DEFAULTED.)) |
| 941 | { |
| 942 | double data; |
| 943 | size_t count; |
| 944 | unsigned int i; |
| 945 | curve = stp_curve_create_copycxx . . $ stp_curve_create_copy(df54bc0b812d6ee).(stp_get_curve_parametercxx . . $ stp_get_curve_parameter(702e9bffd3dd1409).(vars, "GCRCurve")); |
| 946 | stp_curve_resamplecxx . . $ stp_curve_resample(bc87752a72bd695e).(curve, lut->stepscxx . . $ $anonymous_type_b1e744064c9709f4_7#steps.); |
| 947 | count = stp_curve_count_pointscxx . . $ stp_curve_count_points(7c52d22dafe22fab).(curve); |
| 948 | stp_curve_set_boundscxx . . $ stp_curve_set_bounds(758f5ad7a073d1f3).(curve, 0.0, 65535.0); |
| 949 | for (i = 0; i < count; i++) |
| 950 | { |
| 951 | stp_curve_get_pointcxx . . $ stp_curve_get_point(d120f9942fdc532e).(curve, i, &data); |
| 952 | data = 65535.0 * data * (double) i / (count - 1); |
| 953 | stp_curve_set_pointcxx . . $ stp_curve_set_point(fb48804ae78197a).(curve, i, data); |
| 954 | } |
| 955 | } |
| 956 | else |
| 957 | curve = compute_gcr_curvecxx . . $ compute_gcr_curve(2942fb0b2cf2e343).(vars); |
| 958 | stp_channel_set_gcr_curvecxx . . $ stp_channel_set_gcr_curve(9baf911a72254cb5).(vars, curve); |
| 959 | if (curve) |
| 960 | stp_curve_destroycxx . . $ stp_curve_destroy(357dc05c3c24eef1).(curve); |
| 961 | } |
| 962 | |
| 963 | /* |
| 964 | * Channels that are synthesized (e. g. the black channel in CMY -> CMYK |
| 965 | * conversion) need to be computed differently from channels that are |
| 966 | * mapped 1-1 from input to output. Channels that are simply mapped need |
| 967 | * to be inverted if necessary, and in addition the contrast, brightness, |
| 968 | * and other gamma factors are factored in. Channels that are synthesized |
| 969 | * are never inverted, since they're computed from the output of other |
| 970 | * channels that have already been inverted. |
| 971 | * |
| 972 | * This isn't simply a matter of comparing the input channels to the output |
| 973 | * channels, since some of the conversions (K -> CMYK) work by means |
| 974 | * of a chain of conversions (K->CMY->CMYK). In this case, we need to |
| 975 | * fully compute the CMY channels, but the K channel in the output is |
| 976 | * not inverted. |
| 977 | * |
| 978 | * The rules that are implemented by the logic below are: |
| 979 | * |
| 980 | * 1) If the input is raw, we always perform the normal computation (without |
| 981 | * synthesizing channels). |
| 982 | * |
| 983 | * 2) If the output is CMY or K only, we never synthesize channels. We've |
| 984 | * now covered raw, black, and CMY/RGB outputs, leaving CMYK and MULTI. |
| 985 | * |
| 986 | * 3) Output channels above CMYK are synthesized. |
| 987 | * |
| 988 | * 4) If the input is CMYK, we do not synthesize channels. |
| 989 | * |
| 990 | * 5) The black channel (in CMYK) is synthesized. |
| 991 | * |
| 992 | * 6) All other channels (CMY/RGB) are not synthesized. |
| 993 | */ |
| 994 | |
| 995 | static int |
| 996 | channel_is_synthesizedcxx . . $ channel_is_synthesized(c84a3cb6cb5ff84b).(lut_tcxx . . $ lut_t# *lut, int channel) |
| 997 | { |
| 998 | if (lut->output_color_descriptioncxx . . $ $anonymous_type_b1e744064c9709f4_7#output_color_description.->color_idcxx . . $ $anonymous_type_b1e744064c9709f4_5#color_id. == COLOR_ID_RAWcxx . . $ COLOR_ID_RAW.) |
| 999 | return 1; /* Case 1 */ |
| 1000 | else if (lut->output_color_descriptioncxx . . $ $anonymous_type_b1e744064c9709f4_7#output_color_description.->channelscxx . . $ $anonymous_type_b1e744064c9709f4_5#channels. == CMASK_CMYcxx . . $ `src/main/color-conversion.h:100:9`! || |
| 1001 | lut->output_color_descriptioncxx . . $ $anonymous_type_b1e744064c9709f4_7#output_color_description.->channelscxx . . $ $anonymous_type_b1e744064c9709f4_5#channels. == CMASK_Kcxx . . $ `src/main/color-conversion.h:74:9`!) |
| 1002 | return 0; /* Case 2 */ |
| 1003 | else if (channel >= CHANNEL_Wcxx . . $ `src/main/color-conversion.h:68:9`!) |
| 1004 | return 1; /* Case 3 */ |
| 1005 | else if (lut->input_color_descriptioncxx . . $ $anonymous_type_b1e744064c9709f4_7#input_color_description.->channelscxx . . $ $anonymous_type_b1e744064c9709f4_5#channels. == CMASK_CMYKcxx . . $ `src/main/color-conversion.h:101:9`!) |
| 1006 | return 0; /* Case 4 */ |
| 1007 | else if (channel == CHANNEL_Kcxx . . $ `src/main/color-conversion.h:64:9`!) |
| 1008 | return 1; /* Case 5 */ |
| 1009 | else |
| 1010 | return 0; /* Case 6 */ |
| 1011 | } |
| 1012 | |
| 1013 | static void |
| 1014 | compute_user_correctioncxx . . $ compute_user_correction(f54558fb50178cf3).(lut_tcxx . . $ lut_t# *lut) |
| 1015 | { |
| 1016 | double *tmp; |
| 1017 | double *tmp_brightness; |
| 1018 | double *tmp_contrast; |
| 1019 | double xcontrast = lut->contrastcxx . . $ $anonymous_type_b1e744064c9709f4_7#contrast.; |
| 1020 | stp_curve_tcxx . . $ stp_curve_t# *curve = |
| 1021 | stp_curve_cache_get_curvecxx . . $ stp_curve_cache_get_curve(bc2110944d39e504).(&(lut->user_color_correctioncxx . . $ $anonymous_type_b1e744064c9709f4_7#user_color_correction.)); |
| 1022 | stp_curve_tcxx . . $ stp_curve_t# *brightness_curve = |
| 1023 | stp_curve_cache_get_curvecxx . . $ stp_curve_cache_get_curve(bc2110944d39e504).(&(lut->brightness_correctioncxx . . $ $anonymous_type_b1e744064c9709f4_7#brightness_correction.)); |
| 1024 | stp_curve_tcxx . . $ stp_curve_t# *contrast_curve = |
| 1025 | stp_curve_cache_get_curvecxx . . $ stp_curve_cache_get_curve(bc2110944d39e504).(&(lut->contrast_correctioncxx . . $ $anonymous_type_b1e744064c9709f4_7#contrast_correction.)); |
| 1026 | double brightness = lut->brightnesscxx . . $ $anonymous_type_b1e744064c9709f4_7#brightness.; |
| 1027 | unsigned int i; |
| 1028 | unsigned int isteps = lut->stepscxx . . $ $anonymous_type_b1e744064c9709f4_7#steps.; |
| 1029 | if (isteps > 256) |
| 1030 | isteps = 256; |
| 1031 | tmp = stp_malloccxx . . $ stp_malloc(bfcfa4d6b7f7ef64).(sizeof(double) * lut->stepscxx . . $ $anonymous_type_b1e744064c9709f4_7#steps.); |
| 1032 | tmp_brightness = stp_malloccxx . . $ stp_malloc(bfcfa4d6b7f7ef64).(sizeof(double) * lut->stepscxx . . $ $anonymous_type_b1e744064c9709f4_7#steps.); |
| 1033 | tmp_contrast = stp_malloccxx . . $ stp_malloc(bfcfa4d6b7f7ef64).(sizeof(double) * lut->stepscxx . . $ $anonymous_type_b1e744064c9709f4_7#steps.); |
| 1034 | if (brightness < .001) |
| 1035 | brightness = 1000; |
| 1036 | else if (brightness > 1.999) |
| 1037 | brightness = .001; |
| 1038 | else if (brightness > 1) |
| 1039 | brightness = 2.0 - brightness; |
| 1040 | else |
| 1041 | brightness = 1.0 / brightness; |
| 1042 | for (i = 0; i < isteps; i ++) |
| 1043 | { |
| 1044 | double temp_pixel, pixel; |
| 1045 | pixel = (double) i / (double) (isteps - 1); |
| 1046 | /* |
| 1047 | * First, correct contrast |
| 1048 | */ |
| 1049 | if (pixel >= .5) |
| 1050 | temp_pixel = 1.0 - pixel; |
| 1051 | else |
| 1052 | temp_pixel = pixel; |
| 1053 | if (lut->contrastcxx . . $ $anonymous_type_b1e744064c9709f4_7#contrast. > 3.99999) |
| 1054 | { |
| 1055 | if (temp_pixel < .5) |
| 1056 | temp_pixel = 0; |
| 1057 | else |
| 1058 | temp_pixel = 1; |
| 1059 | } |
| 1060 | if (temp_pixel <= .000001 && lut->contrastcxx . . $ $anonymous_type_b1e744064c9709f4_7#contrast. <= .0001) |
| 1061 | temp_pixel = .5; |
| 1062 | else if (temp_pixel > 1) |
| 1063 | temp_pixel = .5 * pow(2 * temp_pixel, xcontrast); |
| 1064 | else if (temp_pixel < 1) |
| 1065 | { |
| 1066 | if (lut->linear_contrast_adjustmentcxx . . $ $anonymous_type_b1e744064c9709f4_7#linear_contrast_adjustment.) |
| 1067 | temp_pixel = 0.5 - |
| 1068 | ((0.5 - .5 * pow(2 * temp_pixel, lut->contrastcxx . . $ $anonymous_type_b1e744064c9709f4_7#contrast.)) * |
| 1069 | lut->contrastcxx . . $ $anonymous_type_b1e744064c9709f4_7#contrast.); |
| 1070 | else |
| 1071 | temp_pixel = 0.5 - |
| 1072 | ((0.5 - .5 * pow(2 * temp_pixel, lut->contrastcxx . . $ $anonymous_type_b1e744064c9709f4_7#contrast.))); |
| 1073 | } |
| 1074 | if (temp_pixel > .5) |
| 1075 | temp_pixel = .5; |
| 1076 | else if (temp_pixel < 0) |
| 1077 | temp_pixel = 0; |
| 1078 | if (pixel < .5) |
| 1079 | pixel = temp_pixel; |
| 1080 | else |
| 1081 | pixel = 1 - temp_pixel; |
| 1082 | tmp_contrast[i] = floor((pixel * 65535) + .5); |
| 1083 | |
| 1084 | /* |
| 1085 | * Second, do brightness |
| 1086 | */ |
| 1087 | if (brightness < 1) |
| 1088 | pixel = pow(pixel, brightness); |
| 1089 | else |
| 1090 | pixel = 1.0 - pow(1.0 - pixel, 1.0 / brightness); |
| 1091 | tmp[i] = floor((pixel * 65535) + .5); |
| 1092 | |
| 1093 | pixel = (double) i / (double) (isteps - 1); |
| 1094 | if (brightness < 1) |
| 1095 | pixel = pow(pixel, brightness); |
| 1096 | else |
| 1097 | pixel = 1.0 - pow(1.0 - pixel, 1.0 / brightness); |
| 1098 | tmp_brightness[i] = floor((pixel * 65535) + .5); |
| 1099 | } |
| 1100 | stp_curve_set_datacxx . . $ stp_curve_set_data(b7b412adf12354dc).(curve, isteps, tmp); |
| 1101 | if (isteps != lut->stepscxx . . $ $anonymous_type_b1e744064c9709f4_7#steps.) |
| 1102 | stp_curve_resamplecxx . . $ stp_curve_resample(bc87752a72bd695e).(curve, lut->stepscxx . . $ $anonymous_type_b1e744064c9709f4_7#steps.); |
| 1103 | stp_curve_set_datacxx . . $ stp_curve_set_data(b7b412adf12354dc).(brightness_curve, isteps, tmp_brightness); |
| 1104 | if (isteps != lut->stepscxx . . $ $anonymous_type_b1e744064c9709f4_7#steps.) |
| 1105 | stp_curve_resamplecxx . . $ stp_curve_resample(bc87752a72bd695e).(brightness_curve, lut->stepscxx . . $ $anonymous_type_b1e744064c9709f4_7#steps.); |
| 1106 | stp_curve_set_datacxx . . $ stp_curve_set_data(b7b412adf12354dc).(contrast_curve, isteps, tmp_contrast); |
| 1107 | if (isteps != lut->stepscxx . . $ $anonymous_type_b1e744064c9709f4_7#steps.) |
| 1108 | stp_curve_resamplecxx . . $ stp_curve_resample(bc87752a72bd695e).(contrast_curve, lut->stepscxx . . $ $anonymous_type_b1e744064c9709f4_7#steps.); |
| 1109 | stp_freecxx . . $ stp_free(5d22bdacc48458e8).(tmp); |
| 1110 | stp_freecxx . . $ stp_free(5d22bdacc48458e8).(tmp_brightness); |
| 1111 | stp_freecxx . . $ stp_free(5d22bdacc48458e8).(tmp_contrast); |
| 1112 | } |
| 1113 | |
| 1114 | static void |
| 1115 | compute_a_curve_fullcxx . . $ compute_a_curve_full(6cadec26879306f6).(lut_tcxx . . $ lut_t# *lut, int channel) |
| 1116 | { |
| 1117 | double *tmp; |
| 1118 | double pivot = .25; |
| 1119 | double ipivot = 1.0 - pivot; |
| 1120 | double xgamma = pow(pivot, lut->screen_gammacxx . . $ $anonymous_type_b1e744064c9709f4_7#screen_gamma.); |
| 1121 | double print_gamma=1.0+9.0*(lut->print_gammacxx . . $ $anonymous_type_b1e744064c9709f4_7#print_gamma.-1.0); |
| 1122 | double pivot2 = .75; |
| 1123 | double ipivot2 = 1.0 - pivot2; |
| 1124 | double xgamma2 = pow(pivot2, print_gamma); |
| 1125 | stp_curve_tcxx . . $ stp_curve_t# *curve = stp_curve_cache_get_curvecxx . . $ stp_curve_cache_get_curve(bc2110944d39e504).(&(lut->channel_curvescxx . . $ $anonymous_type_b1e744064c9709f4_7#channel_curves.[channel])); |
| 1126 | unsigned int i; |
| 1127 | unsigned int isteps = lut->stepscxx . . $ $anonymous_type_b1e744064c9709f4_7#steps.; |
| 1128 | if (isteps > 256) |
| 1129 | isteps = 256; |
| 1130 | tmp = stp_malloccxx . . $ stp_malloc(bfcfa4d6b7f7ef64).(sizeof(double) * lut->stepscxx . . $ $anonymous_type_b1e744064c9709f4_7#steps.); |
| 1131 | for (i = 0; i < isteps; i ++) |
| 1132 | { |
| 1133 | double pixel = (double) i / (double) (isteps - 1); |
| 1134 | |
| 1135 | if (lut->input_color_descriptioncxx . . $ $anonymous_type_b1e744064c9709f4_7#input_color_description.->color_modelcxx . . $ $anonymous_type_b1e744064c9709f4_5#color_model. == COLOR_BLACKcxx . . $ COLOR_BLACK.) |
| 1136 | pixel = 1.0 - pixel; |
| 1137 | |
| 1138 | pixel = 1.0 - |
| 1139 | (1.0 / (1.0 - xgamma)) * |
| 1140 | (pow(pivot + ipivot * pixel, lut->screen_gammacxx . . $ $anonymous_type_b1e744064c9709f4_7#screen_gamma.) - xgamma); |
| 1141 | |
| 1142 | /* |
| 1143 | * Fourth, fix up cyan, magenta, yellow values |
| 1144 | */ |
| 1145 | if (pixel < 0.0) |
| 1146 | pixel = 0.0; |
| 1147 | else if (pixel > 1.0) |
| 1148 | pixel = 1.0; |
| 1149 | |
| 1150 | if (pixel > .9999 && lut->gamma_valuescxx . . $ $anonymous_type_b1e744064c9709f4_7#gamma_values.[channel] < .00001) |
| 1151 | pixel = 0; |
| 1152 | else |
| 1153 | pixel = 1 - pow(1 - pixel, lut->gamma_valuescxx . . $ $anonymous_type_b1e744064c9709f4_7#gamma_values.[channel]); |
| 1154 | /* |
| 1155 | * Finally, fix up print gamma and scale |
| 1156 | */ |
| 1157 | |
| 1158 | /* |
| 1159 | * Change to this function suggested by Alastair Robinson |
| 1160 | * [email protected] |
| 1161 | */ |
| 1162 | pixel = 65535 * (1.0 / (1.0 - xgamma2)) * |
| 1163 | (pow(pivot2 + ipivot2 * pixel, print_gamma) - xgamma2); |
| 1164 | if (lut->output_color_descriptioncxx . . $ $anonymous_type_b1e744064c9709f4_7#output_color_description.->color_modelcxx . . $ $anonymous_type_b1e744064c9709f4_5#color_model. == COLOR_WHITEcxx . . $ COLOR_WHITE.) |
| 1165 | pixel = 65535 - pixel; |
| 1166 | |
| 1167 | if (pixel <= 0.0) |
| 1168 | tmp[i] = 0; |
| 1169 | else if (pixel >= 65535.0) |
| 1170 | tmp[i] = 65535; |
| 1171 | else |
| 1172 | tmp[i] = (pixel); |
| 1173 | tmp[i] = floor(tmp[i] + 0.5); /* rounding is done here */ |
| 1174 | } |
| 1175 | stp_curve_set_datacxx . . $ stp_curve_set_data(b7b412adf12354dc).(curve, isteps, tmp); |
| 1176 | if (isteps != lut->stepscxx . . $ $anonymous_type_b1e744064c9709f4_7#steps.) |
| 1177 | stp_curve_resamplecxx . . $ stp_curve_resample(bc87752a72bd695e).(curve, lut->stepscxx . . $ $anonymous_type_b1e744064c9709f4_7#steps.); |
| 1178 | stp_freecxx . . $ stp_free(5d22bdacc48458e8).(tmp); |
| 1179 | } |
| 1180 | |
| 1181 | static void |
| 1182 | compute_a_curve_fastcxx . . $ compute_a_curve_fast(6cadec26879306f6).(lut_tcxx . . $ lut_t# *lut, int channel) |
| 1183 | { |
| 1184 | double *tmp; |
| 1185 | stp_curve_tcxx . . $ stp_curve_t# *curve = stp_curve_cache_get_curvecxx . . $ stp_curve_cache_get_curve(bc2110944d39e504).(&(lut->channel_curvescxx . . $ $anonymous_type_b1e744064c9709f4_7#channel_curves.[channel])); |
| 1186 | unsigned int i; |
| 1187 | unsigned int isteps = lut->stepscxx . . $ $anonymous_type_b1e744064c9709f4_7#steps.; |
| 1188 | if (isteps > 256) |
| 1189 | isteps = 256; |
| 1190 | tmp = stp_malloccxx . . $ stp_malloc(bfcfa4d6b7f7ef64).(sizeof(double) * lut->stepscxx . . $ $anonymous_type_b1e744064c9709f4_7#steps.); |
| 1191 | for (i = 0; i < isteps; i++) |
| 1192 | { |
| 1193 | double pixel = (double) i / (double) (isteps - 1); |
| 1194 | pixel = 1 - pow(1 - pixel, lut->gamma_valuescxx . . $ $anonymous_type_b1e744064c9709f4_7#gamma_values.[channel]); |
| 1195 | tmp[i] = floor((65535.0 * pixel) + 0.5); |
| 1196 | } |
| 1197 | stp_curve_set_datacxx . . $ stp_curve_set_data(b7b412adf12354dc).(curve, isteps, tmp); |
| 1198 | if (isteps != lut->stepscxx . . $ $anonymous_type_b1e744064c9709f4_7#steps.) |
| 1199 | stp_curve_resamplecxx . . $ stp_curve_resample(bc87752a72bd695e).(curve, lut->stepscxx . . $ $anonymous_type_b1e744064c9709f4_7#steps.); |
| 1200 | stp_freecxx . . $ stp_free(5d22bdacc48458e8).(tmp); |
| 1201 | } |
| 1202 | |
| 1203 | static void |
| 1204 | compute_a_curve_simplecxx . . $ compute_a_curve_simple(6cadec26879306f6).(lut_tcxx . . $ lut_t# *lut, int channel) |
| 1205 | { |
| 1206 | double *tmp; |
| 1207 | stp_curve_tcxx . . $ stp_curve_t# *curve = stp_curve_cache_get_curvecxx . . $ stp_curve_cache_get_curve(bc2110944d39e504).(&(lut->channel_curvescxx . . $ $anonymous_type_b1e744064c9709f4_7#channel_curves.[channel])); |
| 1208 | unsigned int i; |
| 1209 | unsigned int isteps = lut->stepscxx . . $ $anonymous_type_b1e744064c9709f4_7#steps.; |
| 1210 | double gamma = 1.0 / (lut->gamma_valuescxx . . $ $anonymous_type_b1e744064c9709f4_7#gamma_values.[channel] * lut->print_gammacxx . . $ $anonymous_type_b1e744064c9709f4_7#print_gamma.); |
| 1211 | if (isteps > 256) |
| 1212 | isteps = 256; |
| 1213 | tmp = stp_malloccxx . . $ stp_malloc(bfcfa4d6b7f7ef64).(sizeof(double) * lut->stepscxx . . $ $anonymous_type_b1e744064c9709f4_7#steps.); |
| 1214 | for (i = 0; i < isteps; i++) |
| 1215 | { |
| 1216 | double pixel = (double) i / (double) (isteps - 1); |
| 1217 | if (lut->input_color_descriptioncxx . . $ $anonymous_type_b1e744064c9709f4_7#input_color_description.->color_modelcxx . . $ $anonymous_type_b1e744064c9709f4_5#color_model. == COLOR_BLACKcxx . . $ COLOR_BLACK.) |
| 1218 | pixel = 1.0 - pixel; |
| 1219 | pixel = pow(pixel, gamma); |
| 1220 | if (lut->output_color_descriptioncxx . . $ $anonymous_type_b1e744064c9709f4_7#output_color_description.->color_modelcxx . . $ $anonymous_type_b1e744064c9709f4_5#color_model. == COLOR_BLACKcxx . . $ COLOR_BLACK.) |
| 1221 | pixel = 1.0 - pixel; |
| 1222 | tmp[i] = floor((65535.0 * pixel) + 0.5); |
| 1223 | } |
| 1224 | stp_curve_set_datacxx . . $ stp_curve_set_data(b7b412adf12354dc).(curve, isteps, tmp); |
| 1225 | if (isteps != lut->stepscxx . . $ $anonymous_type_b1e744064c9709f4_7#steps.) |
| 1226 | stp_curve_resamplecxx . . $ stp_curve_resample(bc87752a72bd695e).(curve, lut->stepscxx . . $ $anonymous_type_b1e744064c9709f4_7#steps.); |
| 1227 | stp_freecxx . . $ stp_free(5d22bdacc48458e8).(tmp); |
| 1228 | } |
| 1229 | |
| 1230 | /* |
| 1231 | * If the input and output color spaces both have a particular channel, |
| 1232 | * we want to use the general algorithm. If not (i. e. we have to |
| 1233 | * synthesize the channel), use a simple gamma curve. |
| 1234 | */ |
| 1235 | static void |
| 1236 | compute_a_curvecxx . . $ compute_a_curve(6cadec26879306f6).(lut_tcxx . . $ lut_t# *lut, int channel) |
| 1237 | { |
| 1238 | if (channel_is_synthesizedcxx . . $ channel_is_synthesized(c84a3cb6cb5ff84b).(lut, channel)) |
| 1239 | compute_a_curve_fastcxx . . $ compute_a_curve_fast(6cadec26879306f6).(lut, channel); |
| 1240 | else if (lut->simple_gamma_correctioncxx . . $ $anonymous_type_b1e744064c9709f4_7#simple_gamma_correction.) |
| 1241 | compute_a_curve_simplecxx . . $ compute_a_curve_simple(6cadec26879306f6).(lut, channel); |
| 1242 | else |
| 1243 | compute_a_curve_fullcxx . . $ compute_a_curve_full(6cadec26879306f6).(lut, channel); |
| 1244 | } |
| 1245 | |
| 1246 | static void |
| 1247 | invert_curvecxx . . $ invert_curve(53842ddfd844166b).(stp_curve_tcxx . . $ stp_curve_t# *curve, int invert_output) |
| 1248 | { |
| 1249 | double lo, hi; |
| 1250 | unsigned int i; |
| 1251 | size_t count; |
| 1252 | const double *data = stp_curve_get_datacxx . . $ stp_curve_get_data(2a13b0d70f8dce87).(curve, &count); |
| 1253 | double f_gamma = stp_curve_get_gammacxx . . $ stp_curve_get_gamma(ba82a70c8cfd641c).(curve); |
| 1254 | double *tmp_data; |
| 1255 | |
| 1256 | stp_curve_get_boundscxx . . $ stp_curve_get_bounds(de70be28309e8730).(curve, &lo, &hi); |
| 1257 | |
| 1258 | if (f_gamma) |
| 1259 | stp_curve_set_gammacxx . . $ stp_curve_set_gamma(4b664532c6114e82).(curve, -f_gamma); |
| 1260 | else |
| 1261 | { |
| 1262 | tmp_data = stp_malloccxx . . $ stp_malloc(bfcfa4d6b7f7ef64).(sizeof(double) * count); |
| 1263 | for (i = 0; i < count; i++) |
| 1264 | tmp_data[i] = data[count - i - 1]; |
| 1265 | stp_curve_set_datacxx . . $ stp_curve_set_data(b7b412adf12354dc).(curve, count, tmp_data); |
| 1266 | stp_freecxx . . $ stp_free(5d22bdacc48458e8).(tmp_data); |
| 1267 | } |
| 1268 | if (!invert_output) |
| 1269 | { |
| 1270 | stp_curve_rescalecxx . . $ stp_curve_rescale(3a3738bc767b1327).(curve, -1, STP_CURVE_COMPOSE_MULTIPLYcxx . . $ STP_CURVE_COMPOSE_MULTIPLY., |
| 1271 | STP_CURVE_BOUNDS_RESCALEcxx . . $ STP_CURVE_BOUNDS_RESCALE.); |
| 1272 | stp_curve_rescalecxx . . $ stp_curve_rescale(3a3738bc767b1327).(curve, lo + hi, STP_CURVE_COMPOSE_ADDcxx . . $ STP_CURVE_COMPOSE_ADD., |
| 1273 | STP_CURVE_BOUNDS_RESCALEcxx . . $ STP_CURVE_BOUNDS_RESCALE.); |
| 1274 | } |
| 1275 | } |
| 1276 | |
| 1277 | static void |
| 1278 | compute_one_lutcxx . . $ compute_one_lut(6cadec26879306f6).(lut_tcxx . . $ lut_t# *lut, int i) |
| 1279 | { |
| 1280 | stp_curve_tcxx . . $ stp_curve_t# *curve = |
| 1281 | stp_curve_cache_get_curvecxx . . $ stp_curve_cache_get_curve(bc2110944d39e504).(&(lut->channel_curvescxx . . $ $anonymous_type_b1e744064c9709f4_7#channel_curves.[i])); |
| 1282 | if (curve) |
| 1283 | { |
| 1284 | int invert_output = |
| 1285 | !channel_is_synthesizedcxx . . $ channel_is_synthesized(c84a3cb6cb5ff84b).(lut, i) && lut->invert_outputcxx . . $ $anonymous_type_b1e744064c9709f4_7#invert_output.; |
| 1286 | stp_curve_rescalecxx . . $ stp_curve_rescale(3a3738bc767b1327).(curve, 65535.0, STP_CURVE_COMPOSE_MULTIPLYcxx . . $ STP_CURVE_COMPOSE_MULTIPLY., |
| 1287 | STP_CURVE_BOUNDS_RESCALEcxx . . $ STP_CURVE_BOUNDS_RESCALE.); |
| 1288 | if (stp_curve_is_piecewisecxx . . $ stp_curve_is_piecewise(bc3348f13b0b16e6).(curve)) |
| 1289 | stp_curve_resamplecxx . . $ stp_curve_resample(bc87752a72bd695e).(curve, lut->stepscxx . . $ $anonymous_type_b1e744064c9709f4_7#steps.); |
| 1290 | if (lut->invert_outputcxx . . $ $anonymous_type_b1e744064c9709f4_7#invert_output.) |
| 1291 | invert_curvecxx . . $ invert_curve(53842ddfd844166b).(curve, invert_output); |
| 1292 | stp_curve_resamplecxx . . $ stp_curve_resample(bc87752a72bd695e).(curve, lut->stepscxx . . $ $anonymous_type_b1e744064c9709f4_7#steps.); |
| 1293 | } |
| 1294 | else |
| 1295 | { |
| 1296 | curve = stp_curve_create_copycxx . . $ stp_curve_create_copy(df54bc0b812d6ee).(color_curve_boundscxx . . $ color_curve_bounds.); |
| 1297 | stp_curve_rescalecxx . . $ stp_curve_rescale(3a3738bc767b1327).(curve, 65535.0, STP_CURVE_COMPOSE_MULTIPLYcxx . . $ STP_CURVE_COMPOSE_MULTIPLY., |
| 1298 | STP_CURVE_BOUNDS_RESCALEcxx . . $ STP_CURVE_BOUNDS_RESCALE.); |
| 1299 | stp_curve_cache_set_curvecxx . . $ stp_curve_cache_set_curve(ef2a931d75d808f1).(&(lut->channel_curvescxx . . $ $anonymous_type_b1e744064c9709f4_7#channel_curves.[i]), curve); |
| 1300 | compute_a_curvecxx . . $ compute_a_curve(6cadec26879306f6).(lut, i); |
| 1301 | } |
| 1302 | } |
| 1303 | |
| 1304 | static void |
| 1305 | setup_channelcxx . . $ setup_channel(41aed27d6ef8fc0d).(stp_vars_tcxx . . $ stp_vars_t# *v, int i, const channel_param_tcxx . . $ channel_param_t# *p) |
| 1306 | { |
| 1307 | lut_tcxx . . $ lut_t# *lut = (lut_tcxx . . $ lut_t# *)(stp_get_component_datacxx . . $ stp_get_component_data(2bc0070dfdce2f04).(v, "Color")); |
| 1308 | const char *gamma_name = |
| 1309 | (lut->output_color_descriptioncxx . . $ $anonymous_type_b1e744064c9709f4_7#output_color_description.->color_modelcxx . . $ $anonymous_type_b1e744064c9709f4_5#color_model. == COLOR_BLACKcxx . . $ COLOR_BLACK. ? |
| 1310 | p->gamma_namecxx . . $ $anonymous_type_b1e744064c9709f4_3#gamma_name. : p->rgb_gamma_namecxx . . $ $anonymous_type_b1e744064c9709f4_3#rgb_gamma_name.); |
| 1311 | const char *curve_name = |
| 1312 | (lut->output_color_descriptioncxx . . $ $anonymous_type_b1e744064c9709f4_7#output_color_description.->color_modelcxx . . $ $anonymous_type_b1e744064c9709f4_5#color_model. == COLOR_BLACKcxx . . $ COLOR_BLACK. ? |
| 1313 | p->curve_namecxx . . $ $anonymous_type_b1e744064c9709f4_3#curve_name. : p->rgb_curve_namecxx . . $ $anonymous_type_b1e744064c9709f4_3#rgb_curve_name.); |
| 1314 | if (stp_check_float_parametercxx . . $ stp_check_float_parameter(cff2817d3dcc2695).(v, p->gamma_namecxx . . $ $anonymous_type_b1e744064c9709f4_3#gamma_name., STP_PARAMETER_DEFAULTEDcxx . . $ STP_PARAMETER_DEFAULTED.)) |
| 1315 | lut->gamma_valuescxx . . $ $anonymous_type_b1e744064c9709f4_7#gamma_values.[i] = stp_get_float_parametercxx . . $ stp_get_float_parameter(ac3b1c02c916f219).(v, gamma_name); |
| 1316 | |
| 1317 | if (stp_get_curve_parameter_activecxx . . $ stp_get_curve_parameter_active(71ad3a528422d4e7).(v, curve_name) > 0 && |
| 1318 | stp_get_curve_parameter_activecxx . . $ stp_get_curve_parameter_active(71ad3a528422d4e7).(v, curve_name) >= |
| 1319 | stp_get_float_parameter_activecxx . . $ stp_get_float_parameter_active(71ad3a528422d4e7).(v, gamma_name)) |
| 1320 | stp_curve_cache_set_curve_copycxx . . $ stp_curve_cache_set_curve_copy(692867caac9445c1). |
| 1321 | (&(lut->channel_curvescxx . . $ $anonymous_type_b1e744064c9709f4_7#channel_curves.[i]), stp_get_curve_parametercxx . . $ stp_get_curve_parameter(702e9bffd3dd1409).(v, curve_name)); |
| 1322 | |
| 1323 | stp_dprintfcxx . . $ stp_dprintf(13526ca24396f6ac).(STP_DBG_LUTcxx . . $ `include/gutenprint/util.h:166:9`!, v, " %s %.3f\n", gamma_name, lut->gamma_valuescxx . . $ $anonymous_type_b1e744064c9709f4_7#gamma_values.[i]); |
| 1324 | compute_one_lutcxx . . $ compute_one_lut(6cadec26879306f6).(lut, i); |
| 1325 | } |
| 1326 | |
| 1327 | static void |
| 1328 | stpi_print_lut_curvecxx . . $ stpi_print_lut_curve(27b2ac7f76d5a91f).(FILEcxx . . $ FILE# *fp, const char *text, stp_cached_curve_tcxx . . $ stp_cached_curve_t# *c, |
| 1329 | int reverse) |
| 1330 | { |
| 1331 | if (stp_curve_cache_get_curvecxx . . $ stp_curve_cache_get_curve(bc2110944d39e504).(c)) |
| 1332 | { |
| 1333 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(fp, "%s: '", text); |
| 1334 | if (reverse) |
| 1335 | { |
| 1336 | stp_curve_tcxx . . $ stp_curve_t# *rev = stp_curve_create_reversecxx . . $ stp_curve_create_reverse(df54bc0b812d6ee).(stp_curve_cache_get_curvecxx . . $ stp_curve_cache_get_curve(bc2110944d39e504).(c)); |
| 1337 | stp_curve_writecxx . . $ stp_curve_write(963948d587b55a3d).(fp, rev); |
| 1338 | stp_curve_destroycxx . . $ stp_curve_destroy(357dc05c3c24eef1).(rev); |
| 1339 | } |
| 1340 | else |
| 1341 | stp_curve_writecxx . . $ stp_curve_write(963948d587b55a3d).(fp, stp_curve_cache_get_curvecxx . . $ stp_curve_cache_get_curve(bc2110944d39e504).(c)); |
| 1342 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(fp, "'\n"); |
| 1343 | } |
| 1344 | } |
| 1345 | |
| 1346 | static void |
| 1347 | stpi_do_dump_lut_to_filecxx . . $ stpi_do_dump_lut_to_file(c1aecbf10a6c051a).(stp_vars_tcxx . . $ stp_vars_t# *v, FILEcxx . . $ FILE# *fp) |
| 1348 | { |
| 1349 | int i; |
| 1350 | lut_tcxx . . $ lut_t# *lut = (lut_tcxx . . $ lut_t# *)(stp_get_component_datacxx . . $ stp_get_component_data(2bc0070dfdce2f04).(v, "Color")); |
| 1351 | const stp_curve_tcxx . . $ stp_curve_t# *curve; |
| 1352 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(fp, "Gutenprint LUT dump version 0\n\n"); |
| 1353 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(fp, "Input color description: '%s'\n", lut->input_color_descriptioncxx . . $ $anonymous_type_b1e744064c9709f4_7#input_color_description.->namecxx . . $ $anonymous_type_b1e744064c9709f4_5#name.); |
| 1354 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(fp, "Output color description: '%s'\n", lut->output_color_descriptioncxx . . $ $anonymous_type_b1e744064c9709f4_7#output_color_description.->namecxx . . $ $anonymous_type_b1e744064c9709f4_5#name.); |
| 1355 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(fp, "Color correction type: '%s'\n", lut->color_correctioncxx . . $ $anonymous_type_b1e744064c9709f4_7#color_correction.->namecxx . . $ $anonymous_type_b1e744064c9709f4_1#name.); |
| 1356 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(fp, "Ink limit: %f\n", stp_get_float_parametercxx . . $ stp_get_float_parameter(ac3b1c02c916f219).(v, "InkLimit")); |
| 1357 | stpi_print_lut_curvecxx . . $ stpi_print_lut_curve(27b2ac7f76d5a91f).(fp, "Brightness correction", &(lut->brightness_correctioncxx . . $ $anonymous_type_b1e744064c9709f4_7#brightness_correction.), 0); |
| 1358 | stpi_print_lut_curvecxx . . $ stpi_print_lut_curve(27b2ac7f76d5a91f).(fp, "Contrast correction", &(lut->contrast_correctioncxx . . $ $anonymous_type_b1e744064c9709f4_7#contrast_correction.), 0); |
| 1359 | stpi_print_lut_curvecxx . . $ stpi_print_lut_curve(27b2ac7f76d5a91f).(fp, "User color correction", &(lut->user_color_correctioncxx . . $ $anonymous_type_b1e744064c9709f4_7#user_color_correction.), 0); |
| 1360 | for (i = 0; i < STP_CHANNEL_LIMITcxx . . $ `include/gutenprint/image.h:48:9`!; i++) |
| 1361 | { |
| 1362 | char buf[64]; |
| 1363 | sprintfcxx . . $ sprintf(26c8642d26409d6d).(buf, "Channel %d curve", i); |
| 1364 | stpi_print_lut_curvecxx . . $ stpi_print_lut_curve(27b2ac7f76d5a91f).(fp, buf, &(lut->channel_curvescxx . . $ $anonymous_type_b1e744064c9709f4_7#channel_curves.[i]), |
| 1365 | lut->invert_outputcxx . . $ $anonymous_type_b1e744064c9709f4_7#invert_output. && ! channel_is_synthesizedcxx . . $ channel_is_synthesized(c84a3cb6cb5ff84b).(lut, i)); |
| 1366 | } |
| 1367 | curve = stp_channel_get_gcr_curvecxx . . $ stp_channel_get_gcr_curve(20039c54d3b39880).(v); |
| 1368 | if (curve) |
| 1369 | { |
| 1370 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(fp, "GCR curve: '"); |
| 1371 | stp_curve_writecxx . . $ stp_curve_write(963948d587b55a3d).(fp, curve); |
| 1372 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(fp, "'\n"); |
| 1373 | } |
| 1374 | } |
| 1375 | |
| 1376 | static void |
| 1377 | stpi_dump_lut_to_filecxx . . $ stpi_dump_lut_to_file(f1526d77388867f8).(stp_vars_tcxx . . $ stp_vars_t# *v, const char *dump_file) |
| 1378 | { |
| 1379 | FILEcxx . . $ FILE# *fp; |
| 1380 | if (!dump_file) |
| 1381 | return; |
| 1382 | fp = fopencxx . . $ fopen(82ec0787cd37e0a3).(dump_file, "w"); |
| 1383 | if (fp) |
| 1384 | { |
| 1385 | stp_dprintfcxx . . $ stp_dprintf(13526ca24396f6ac).(STP_DBG_LUTcxx . . $ `include/gutenprint/util.h:166:9`!, v, "Dumping LUT to %s\n", dump_file); |
| 1386 | stpi_do_dump_lut_to_filecxx . . $ stpi_do_dump_lut_to_file(c1aecbf10a6c051a).(v, fp); |
| 1387 | (void) fclosecxx . . $ fclose(89bc1efcdac0ca22).(fp); |
| 1388 | } |
| 1389 | } |
| 1390 | |
| 1391 | static void |
| 1392 | stpi_compute_lutcxx . . $ stpi_compute_lut(1a97b8462f9f913c).(stp_vars_tcxx . . $ stp_vars_t# *v) |
| 1393 | { |
| 1394 | int i; |
| 1395 | lut_tcxx . . $ lut_t# *lut = (lut_tcxx . . $ lut_t# *)(stp_get_component_datacxx . . $ stp_get_component_data(2bc0070dfdce2f04).(v, "Color")); |
| 1396 | double app_gamma_scale = 4.0; |
| 1397 | stp_curve_tcxx . . $ stp_curve_t# *curve; |
| 1398 | stp_dprintfcxx . . $ stp_dprintf(13526ca24396f6ac).(STP_DBG_LUTcxx . . $ `include/gutenprint/util.h:166:9`!, v, "stpi_compute_lut\n"); |
| 1399 | |
| 1400 | if (lut->input_color_descriptioncxx . . $ $anonymous_type_b1e744064c9709f4_7#input_color_description.->color_modelcxx . . $ $anonymous_type_b1e744064c9709f4_5#color_model. == COLOR_UNKNOWNcxx . . $ COLOR_UNKNOWN. || |
| 1401 | lut->output_color_descriptioncxx . . $ $anonymous_type_b1e744064c9709f4_7#output_color_description.->color_modelcxx . . $ $anonymous_type_b1e744064c9709f4_5#color_model. == COLOR_UNKNOWNcxx . . $ COLOR_UNKNOWN. || |
| 1402 | lut->input_color_descriptioncxx . . $ $anonymous_type_b1e744064c9709f4_7#input_color_description.->color_modelcxx . . $ $anonymous_type_b1e744064c9709f4_5#color_model. == |
| 1403 | lut->output_color_descriptioncxx . . $ $anonymous_type_b1e744064c9709f4_7#output_color_description.->color_modelcxx . . $ $anonymous_type_b1e744064c9709f4_5#color_model.) |
| 1404 | lut->invert_outputcxx . . $ $anonymous_type_b1e744064c9709f4_7#invert_output. = 0; |
| 1405 | else |
| 1406 | lut->invert_outputcxx . . $ $anonymous_type_b1e744064c9709f4_7#invert_output. = 1; |
| 1407 | |
| 1408 | lut->linear_contrast_adjustmentcxx . . $ $anonymous_type_b1e744064c9709f4_7#linear_contrast_adjustment. = 0; |
| 1409 | lut->print_gammacxx . . $ $anonymous_type_b1e744064c9709f4_7#print_gamma. = 1.0; |
| 1410 | lut->app_gammacxx . . $ $anonymous_type_b1e744064c9709f4_7#app_gamma. = 1.0; |
| 1411 | lut->contrastcxx . . $ $anonymous_type_b1e744064c9709f4_7#contrast. = 1.0; |
| 1412 | lut->brightnesscxx . . $ $anonymous_type_b1e744064c9709f4_7#brightness. = 1.0; |
| 1413 | lut->simple_gamma_correctioncxx . . $ $anonymous_type_b1e744064c9709f4_7#simple_gamma_correction. = 0; |
| 1414 | |
| 1415 | if (stp_check_boolean_parametercxx . . $ stp_check_boolean_parameter(cff2817d3dcc2695).(v, "LinearContrast", STP_PARAMETER_DEFAULTEDcxx . . $ STP_PARAMETER_DEFAULTED.)) |
| 1416 | lut->linear_contrast_adjustmentcxx . . $ $anonymous_type_b1e744064c9709f4_7#linear_contrast_adjustment. = |
| 1417 | stp_get_boolean_parametercxx . . $ stp_get_boolean_parameter(b1e629819c29df09).(v, "LinearContrast"); |
| 1418 | if (stp_check_float_parametercxx . . $ stp_check_float_parameter(cff2817d3dcc2695).(v, "Gamma", STP_PARAMETER_DEFAULTEDcxx . . $ STP_PARAMETER_DEFAULTED.)) |
| 1419 | lut->print_gammacxx . . $ $anonymous_type_b1e744064c9709f4_7#print_gamma. = stp_get_float_parametercxx . . $ stp_get_float_parameter(ac3b1c02c916f219).(v, "Gamma"); |
| 1420 | if (stp_check_float_parametercxx . . $ stp_check_float_parameter(cff2817d3dcc2695).(v, "Contrast", STP_PARAMETER_DEFAULTEDcxx . . $ STP_PARAMETER_DEFAULTED.)) |
| 1421 | lut->contrastcxx . . $ $anonymous_type_b1e744064c9709f4_7#contrast. = stp_get_float_parametercxx . . $ stp_get_float_parameter(ac3b1c02c916f219).(v, "Contrast"); |
| 1422 | if (stp_check_float_parametercxx . . $ stp_check_float_parameter(cff2817d3dcc2695).(v, "Brightness", STP_PARAMETER_DEFAULTEDcxx . . $ STP_PARAMETER_DEFAULTED.)) |
| 1423 | lut->brightnesscxx . . $ $anonymous_type_b1e744064c9709f4_7#brightness. = stp_get_float_parametercxx . . $ stp_get_float_parameter(ac3b1c02c916f219).(v, "Brightness"); |
| 1424 | |
| 1425 | if (stp_check_float_parametercxx . . $ stp_check_float_parameter(cff2817d3dcc2695).(v, "AppGamma", STP_PARAMETER_ACTIVEcxx . . $ STP_PARAMETER_ACTIVE.)) |
| 1426 | lut->app_gammacxx . . $ $anonymous_type_b1e744064c9709f4_7#app_gamma. = stp_get_float_parametercxx . . $ stp_get_float_parameter(ac3b1c02c916f219).(v, "AppGamma"); |
| 1427 | if (stp_check_float_parametercxx . . $ stp_check_float_parameter(cff2817d3dcc2695).(v, "AppGammaScale", STP_PARAMETER_ACTIVEcxx . . $ STP_PARAMETER_ACTIVE.)) |
| 1428 | app_gamma_scale = stp_get_float_parametercxx . . $ stp_get_float_parameter(ac3b1c02c916f219).(v, "AppGammaScale"); |
| 1429 | if (stp_check_boolean_parametercxx . . $ stp_check_boolean_parameter(cff2817d3dcc2695).(v, "SimpleGamma", STP_PARAMETER_ACTIVEcxx . . $ STP_PARAMETER_ACTIVE.)) |
| 1430 | lut->simple_gamma_correctioncxx . . $ $anonymous_type_b1e744064c9709f4_7#simple_gamma_correction. = stp_get_boolean_parametercxx . . $ stp_get_boolean_parameter(b1e629819c29df09).(v, "SimpleGamma"); |
| 1431 | lut->screen_gammacxx . . $ $anonymous_type_b1e744064c9709f4_7#screen_gamma. = lut->app_gammacxx . . $ $anonymous_type_b1e744064c9709f4_7#app_gamma. / app_gamma_scale; /* "Empirical" */ |
| 1432 | curve = stp_curve_create_copycxx . . $ stp_curve_create_copy(df54bc0b812d6ee).(color_curve_boundscxx . . $ color_curve_bounds.); |
| 1433 | stp_curve_rescalecxx . . $ stp_curve_rescale(3a3738bc767b1327).(curve, 65535.0, STP_CURVE_COMPOSE_MULTIPLYcxx . . $ STP_CURVE_COMPOSE_MULTIPLY., |
| 1434 | STP_CURVE_BOUNDS_RESCALEcxx . . $ STP_CURVE_BOUNDS_RESCALE.); |
| 1435 | stp_curve_cache_set_curvecxx . . $ stp_curve_cache_set_curve(ef2a931d75d808f1).(&(lut->user_color_correctioncxx . . $ $anonymous_type_b1e744064c9709f4_7#user_color_correction.), curve); |
| 1436 | curve = stp_curve_create_copycxx . . $ stp_curve_create_copy(df54bc0b812d6ee).(color_curve_boundscxx . . $ color_curve_bounds.); |
| 1437 | stp_curve_rescalecxx . . $ stp_curve_rescale(3a3738bc767b1327).(curve, 65535.0, STP_CURVE_COMPOSE_MULTIPLYcxx . . $ STP_CURVE_COMPOSE_MULTIPLY., |
| 1438 | STP_CURVE_BOUNDS_RESCALEcxx . . $ STP_CURVE_BOUNDS_RESCALE.); |
| 1439 | stp_curve_cache_set_curvecxx . . $ stp_curve_cache_set_curve(ef2a931d75d808f1).(&(lut->brightness_correctioncxx . . $ $anonymous_type_b1e744064c9709f4_7#brightness_correction.), curve); |
| 1440 | curve = stp_curve_create_copycxx . . $ stp_curve_create_copy(df54bc0b812d6ee).(color_curve_boundscxx . . $ color_curve_bounds.); |
| 1441 | stp_curve_rescalecxx . . $ stp_curve_rescale(3a3738bc767b1327).(curve, 65535.0, STP_CURVE_COMPOSE_MULTIPLYcxx . . $ STP_CURVE_COMPOSE_MULTIPLY., |
| 1442 | STP_CURVE_BOUNDS_RESCALEcxx . . $ STP_CURVE_BOUNDS_RESCALE.); |
| 1443 | stp_curve_cache_set_curvecxx . . $ stp_curve_cache_set_curve(ef2a931d75d808f1).(&(lut->contrast_correctioncxx . . $ $anonymous_type_b1e744064c9709f4_7#contrast_correction.), curve); |
| 1444 | compute_user_correctioncxx . . $ compute_user_correction(f54558fb50178cf3).(lut); |
| 1445 | |
| 1446 | /* |
| 1447 | * TODO check that these are wraparound curves and all that |
| 1448 | */ |
| 1449 | |
| 1450 | if (lut->color_correctioncxx . . $ $anonymous_type_b1e744064c9709f4_7#color_correction.->correct_hslcxx . . $ $anonymous_type_b1e744064c9709f4_1#correct_hsl.) |
| 1451 | { |
| 1452 | if (stp_check_curve_parametercxx . . $ stp_check_curve_parameter(cff2817d3dcc2695).(v, "HueMap", STP_PARAMETER_DEFAULTEDcxx . . $ STP_PARAMETER_DEFAULTED.)) |
| 1453 | { |
| 1454 | lut->hue_mapcxx . . $ $anonymous_type_b1e744064c9709f4_7#hue_map..curvecxx . . $ $anonymous_type_3c95b9fcff2ba970_0#curve. = |
| 1455 | stp_curve_create_copycxx . . $ stp_curve_create_copy(df54bc0b812d6ee).(stp_get_curve_parametercxx . . $ stp_get_curve_parameter(702e9bffd3dd1409).(v, "HueMap")); |
| 1456 | if (stp_curve_is_piecewisecxx . . $ stp_curve_is_piecewise(bc3348f13b0b16e6).(lut->hue_mapcxx . . $ $anonymous_type_b1e744064c9709f4_7#hue_map..curvecxx . . $ $anonymous_type_3c95b9fcff2ba970_0#curve.)) |
| 1457 | stp_curve_resamplecxx . . $ stp_curve_resample(bc87752a72bd695e).(lut->hue_mapcxx . . $ $anonymous_type_b1e744064c9709f4_7#hue_map..curvecxx . . $ $anonymous_type_3c95b9fcff2ba970_0#curve., 384); |
| 1458 | } |
| 1459 | if (stp_check_curve_parametercxx . . $ stp_check_curve_parameter(cff2817d3dcc2695).(v, "LumMap", STP_PARAMETER_DEFAULTEDcxx . . $ STP_PARAMETER_DEFAULTED.)) |
| 1460 | { |
| 1461 | lut->lum_mapcxx . . $ $anonymous_type_b1e744064c9709f4_7#lum_map..curvecxx . . $ $anonymous_type_3c95b9fcff2ba970_0#curve. = |
| 1462 | stp_curve_create_copycxx . . $ stp_curve_create_copy(df54bc0b812d6ee).(stp_get_curve_parametercxx . . $ stp_get_curve_parameter(702e9bffd3dd1409).(v, "LumMap")); |
| 1463 | if (stp_curve_is_piecewisecxx . . $ stp_curve_is_piecewise(bc3348f13b0b16e6).(lut->lum_mapcxx . . $ $anonymous_type_b1e744064c9709f4_7#lum_map..curvecxx . . $ $anonymous_type_3c95b9fcff2ba970_0#curve.)) |
| 1464 | stp_curve_resamplecxx . . $ stp_curve_resample(bc87752a72bd695e).(lut->lum_mapcxx . . $ $anonymous_type_b1e744064c9709f4_7#lum_map..curvecxx . . $ $anonymous_type_3c95b9fcff2ba970_0#curve., 384); |
| 1465 | } |
| 1466 | if (stp_check_curve_parametercxx . . $ stp_check_curve_parameter(cff2817d3dcc2695).(v, "SatMap", STP_PARAMETER_DEFAULTEDcxx . . $ STP_PARAMETER_DEFAULTED.)) |
| 1467 | { |
| 1468 | lut->sat_mapcxx . . $ $anonymous_type_b1e744064c9709f4_7#sat_map..curvecxx . . $ $anonymous_type_3c95b9fcff2ba970_0#curve. = |
| 1469 | stp_curve_create_copycxx . . $ stp_curve_create_copy(df54bc0b812d6ee).(stp_get_curve_parametercxx . . $ stp_get_curve_parameter(702e9bffd3dd1409).(v, "SatMap")); |
| 1470 | if (stp_curve_is_piecewisecxx . . $ stp_curve_is_piecewise(bc3348f13b0b16e6).(lut->sat_mapcxx . . $ $anonymous_type_b1e744064c9709f4_7#sat_map..curvecxx . . $ $anonymous_type_3c95b9fcff2ba970_0#curve.)) |
| 1471 | stp_curve_resamplecxx . . $ stp_curve_resample(bc87752a72bd695e).(lut->sat_mapcxx . . $ $anonymous_type_b1e744064c9709f4_7#sat_map..curvecxx . . $ $anonymous_type_3c95b9fcff2ba970_0#curve., 384); |
| 1472 | } |
| 1473 | } |
| 1474 | |
| 1475 | stp_dprintfcxx . . $ stp_dprintf(13526ca24396f6ac).(STP_DBG_LUTcxx . . $ `include/gutenprint/util.h:166:9`!, v, " print_gamma %.3f\n", lut->print_gammacxx . . $ $anonymous_type_b1e744064c9709f4_7#print_gamma.); |
| 1476 | stp_dprintfcxx . . $ stp_dprintf(13526ca24396f6ac).(STP_DBG_LUTcxx . . $ `include/gutenprint/util.h:166:9`!, v, " contrast %.3f\n", lut->contrastcxx . . $ $anonymous_type_b1e744064c9709f4_7#contrast.); |
| 1477 | stp_dprintfcxx . . $ stp_dprintf(13526ca24396f6ac).(STP_DBG_LUTcxx . . $ `include/gutenprint/util.h:166:9`!, v, " brightness %.3f\n", lut->brightnesscxx . . $ $anonymous_type_b1e744064c9709f4_7#brightness.); |
| 1478 | stp_dprintfcxx . . $ stp_dprintf(13526ca24396f6ac).(STP_DBG_LUTcxx . . $ `include/gutenprint/util.h:166:9`!, v, " screen_gamma %.3f\n", lut->screen_gammacxx . . $ $anonymous_type_b1e744064c9709f4_7#screen_gamma.); |
| 1479 | |
| 1480 | for (i = 0; i < STP_CHANNEL_LIMITcxx . . $ `include/gutenprint/image.h:48:9`!; i++) |
| 1481 | { |
| 1482 | STPI_ASSERTcxx . . $ `src/main/gutenprint-internal.h:58:9`!(i < raw_channel_param_count, v); |
| 1483 | if (lut->output_color_descriptioncxx . . $ $anonymous_type_b1e744064c9709f4_7#output_color_description.->channel_countcxx . . $ $anonymous_type_b1e744064c9709f4_5#channel_count. < 1 && |
| 1484 | i < lut->out_channelscxx . . $ $anonymous_type_b1e744064c9709f4_7#out_channels.) |
| 1485 | setup_channelcxx . . $ setup_channel(41aed27d6ef8fc0d).(v, i, &(raw_channel_paramscxx . . $ raw_channel_params.[i])); |
| 1486 | else if (i < channel_param_countcxx . . $ channel_param_count. && |
| 1487 | lut->output_color_descriptioncxx . . $ $anonymous_type_b1e744064c9709f4_7#output_color_description.->channelscxx . . $ $anonymous_type_b1e744064c9709f4_5#channels. & (1 << i)) |
| 1488 | setup_channelcxx . . $ setup_channel(41aed27d6ef8fc0d).(v, i, &(channel_paramscxx . . $ channel_params.[i])); |
| 1489 | } |
| 1490 | if (((lut->output_color_descriptioncxx . . $ $anonymous_type_b1e744064c9709f4_7#output_color_description.->channelscxx . . $ $anonymous_type_b1e744064c9709f4_5#channels. & CMASK_CMYKcxx . . $ `src/main/color-conversion.h:101:9`!) == CMASK_CMYKcxx . . $ `src/main/color-conversion.h:101:9`!) && |
| 1491 | (lut->color_correctioncxx . . $ $anonymous_type_b1e744064c9709f4_7#color_correction.->correctioncxx . . $ $anonymous_type_b1e744064c9709f4_1#correction. == COLOR_CORRECTION_DESATURATEDcxx . . $ COLOR_CORRECTION_DESATURATED. || |
| 1492 | lut->input_color_descriptioncxx . . $ $anonymous_type_b1e744064c9709f4_7#input_color_description.->color_idcxx . . $ $anonymous_type_b1e744064c9709f4_5#color_id. == COLOR_ID_GRAYcxx . . $ COLOR_ID_GRAY. || |
| 1493 | lut->input_color_descriptioncxx . . $ $anonymous_type_b1e744064c9709f4_7#input_color_description.->color_idcxx . . $ $anonymous_type_b1e744064c9709f4_5#color_id. == COLOR_ID_WHITEcxx . . $ COLOR_ID_WHITE. || |
| 1494 | lut->input_color_descriptioncxx . . $ $anonymous_type_b1e744064c9709f4_7#input_color_description.->color_idcxx . . $ $anonymous_type_b1e744064c9709f4_5#color_id. == COLOR_ID_RGBcxx . . $ COLOR_ID_RGB. || |
| 1495 | lut->input_color_descriptioncxx . . $ $anonymous_type_b1e744064c9709f4_7#input_color_description.->color_idcxx . . $ $anonymous_type_b1e744064c9709f4_5#color_id. == COLOR_ID_CMYcxx . . $ COLOR_ID_CMY.)) |
| 1496 | initialize_gcr_curvecxx . . $ initialize_gcr_curve(1a97b8462f9f913c).(v); |
| 1497 | if (stp_check_file_parametercxx . . $ stp_check_file_parameter(cff2817d3dcc2695).(v, "LUTDumpFile", STP_PARAMETER_ACTIVEcxx . . $ STP_PARAMETER_ACTIVE.)) |
| 1498 | stpi_dump_lut_to_filecxx . . $ stpi_dump_lut_to_file(f1526d77388867f8).(v, stp_get_file_parametercxx . . $ stp_get_file_parameter(3e3ce5d385745545).(v, "LUTDumpFile")); |
| 1499 | } |
| 1500 | |
| 1501 | static int |
| 1502 | stpi_color_traditional_initcxx . . $ stpi_color_traditional_init(8474e95f5358b69d).(stp_vars_tcxx . . $ stp_vars_t# *v, |
| 1503 | stp_image_tcxx . . $ stp_image_t# *image, |
| 1504 | size_t steps) |
| 1505 | { |
| 1506 | lut_tcxx . . $ lut_t# *lut; |
| 1507 | const char *image_type = stp_get_string_parametercxx . . $ stp_get_string_parameter(3e3ce5d385745545).(v, "ImageType"); |
| 1508 | const char *color_correction = stp_get_string_parametercxx . . $ stp_get_string_parameter(3e3ce5d385745545).(v, "ColorCorrection"); |
| 1509 | const channel_depth_tcxx . . $ channel_depth_t# *channel_depth = |
| 1510 | get_channel_depthcxx . . $ get_channel_depth(ddd3aef4da13bea5).(stp_get_string_parametercxx . . $ stp_get_string_parameter(3e3ce5d385745545).(v, "ChannelBitDepth")); |
| 1511 | size_t total_channel_bits; |
| 1512 | |
| 1513 | if (steps != 256 && steps != 65536) |
| 1514 | { |
| 1515 | stp_eprintfcxx . . $ stp_eprintf(7aef7aa9b820d38).(v, |
| 1516 | "stpi_color_traditional_init: Invalid color steps %lu (must be 256 or 65536)\n", |
| 1517 | (unsigned long) steps); |
| 1518 | return -1; |
| 1519 | } |
| 1520 | if (!channel_depth) |
| 1521 | { |
| 1522 | stp_eprintfcxx . . $ stp_eprintf(7aef7aa9b820d38).(v, "stpi_color_traditional_init: ChannelBitDepth not set\n"); |
| 1523 | return -1; |
| 1524 | } |
| 1525 | |
| 1526 | lut = allocate_lutcxx . . $ allocate_lut(3659397ce926397).(); |
| 1527 | lut->input_color_descriptioncxx . . $ $anonymous_type_b1e744064c9709f4_7#input_color_description. = |
| 1528 | get_color_descriptioncxx . . $ get_color_description(f61840fb2058e480).(stp_get_string_parametercxx . . $ stp_get_string_parameter(3e3ce5d385745545).(v, "InputImageType")); |
| 1529 | lut->output_color_descriptioncxx . . $ $anonymous_type_b1e744064c9709f4_7#output_color_description. = |
| 1530 | get_color_descriptioncxx . . $ get_color_description(f61840fb2058e480).(stp_get_string_parametercxx . . $ stp_get_string_parameter(3e3ce5d385745545).(v, "STPIOutputType")); |
| 1531 | |
| 1532 | if (!lut->input_color_descriptioncxx . . $ $anonymous_type_b1e744064c9709f4_7#input_color_description. || !lut->output_color_descriptioncxx . . $ $anonymous_type_b1e744064c9709f4_7#output_color_description.) |
| 1533 | { |
| 1534 | stp_eprintfcxx . . $ stp_eprintf(7aef7aa9b820d38).(v, "stpi_color_traditional_init: input/output types not specified\n"); |
| 1535 | free_lutcxx . . $ free_lut(5d22bdacc48458e8).(lut); |
| 1536 | return -1; |
| 1537 | } |
| 1538 | |
| 1539 | if (lut->input_color_descriptioncxx . . $ $anonymous_type_b1e744064c9709f4_7#input_color_description.->color_idcxx . . $ $anonymous_type_b1e744064c9709f4_5#color_id. == COLOR_ID_RAWcxx . . $ COLOR_ID_RAW.) |
| 1540 | { |
| 1541 | if (stp_verify_parametercxx . . $ stp_verify_parameter(7de511013079b54c).(v, "STPIRawChannels", 1) != PARAMETER_OKcxx . . $ PARAMETER_OK.) |
| 1542 | { |
| 1543 | stp_eprintfcxx . . $ stp_eprintf(7aef7aa9b820d38).(v, "stpi_color_traditional_init: raw printing requested but STPIRawChannels not set\n"); |
| 1544 | free_lutcxx . . $ free_lut(5d22bdacc48458e8).(lut); |
| 1545 | return -1; |
| 1546 | } |
| 1547 | lut->out_channelscxx . . $ $anonymous_type_b1e744064c9709f4_7#out_channels. = stp_get_int_parametercxx . . $ stp_get_int_parameter(b1e629819c29df09).(v, "STPIRawChannels"); |
| 1548 | lut->in_channelscxx . . $ $anonymous_type_b1e744064c9709f4_7#in_channels. = lut->out_channelscxx . . $ $anonymous_type_b1e744064c9709f4_7#out_channels.; |
| 1549 | } |
| 1550 | else |
| 1551 | { |
| 1552 | lut->out_channelscxx . . $ $anonymous_type_b1e744064c9709f4_7#out_channels. = lut->output_color_descriptioncxx . . $ $anonymous_type_b1e744064c9709f4_7#output_color_description.->channel_countcxx . . $ $anonymous_type_b1e744064c9709f4_5#channel_count.; |
| 1553 | lut->in_channelscxx . . $ $anonymous_type_b1e744064c9709f4_7#in_channels. = lut->input_color_descriptioncxx . . $ $anonymous_type_b1e744064c9709f4_7#input_color_description.->channel_countcxx . . $ $anonymous_type_b1e744064c9709f4_5#channel_count.; |
| 1554 | } |
| 1555 | |
| 1556 | stp_allocate_component_datacxx . . $ stp_allocate_component_data(c746010122f90098).(v, "Color", copy_lutcxx . . $ copy_lut(9f162e79bfc6c74)., free_lutcxx . . $ free_lut(5d22bdacc48458e8)., lut); |
| 1557 | lut->stepscxx . . $ $anonymous_type_b1e744064c9709f4_7#steps. = steps; |
| 1558 | lut->channel_depthcxx . . $ $anonymous_type_b1e744064c9709f4_7#channel_depth. = channel_depth->bitscxx . . $ $anonymous_type_b1e744064c9709f4_6#bits.; |
| 1559 | |
| 1560 | if ((!color_correction || strcmpcxx . . $ strcmp(5ae29d726ae57f88).(color_correction, "None") == 0) && |
| 1561 | image_type && strcmpcxx . . $ strcmp(5ae29d726ae57f88).(image_type, "None") != 0) |
| 1562 | { |
| 1563 | if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(image_type, "Text") == 0) |
| 1564 | lut->color_correctioncxx . . $ $anonymous_type_b1e744064c9709f4_7#color_correction. = get_color_correctioncxx . . $ get_color_correction(2e72bd2e7c2093d6).("Threshold"); |
| 1565 | else |
| 1566 | lut->color_correctioncxx . . $ $anonymous_type_b1e744064c9709f4_7#color_correction. = get_color_correctioncxx . . $ get_color_correction(2e72bd2e7c2093d6).("None"); |
| 1567 | } |
| 1568 | else if (color_correction) |
| 1569 | lut->color_correctioncxx . . $ $anonymous_type_b1e744064c9709f4_7#color_correction. = get_color_correctioncxx . . $ get_color_correction(2e72bd2e7c2093d6).(color_correction); |
| 1570 | else |
| 1571 | lut->color_correctioncxx . . $ $anonymous_type_b1e744064c9709f4_7#color_correction. = get_color_correctioncxx . . $ get_color_correction(2e72bd2e7c2093d6).("None"); |
| 1572 | if (lut->color_correctioncxx . . $ $anonymous_type_b1e744064c9709f4_7#color_correction.->correctioncxx . . $ $anonymous_type_b1e744064c9709f4_1#correction. == COLOR_CORRECTION_DEFAULTcxx . . $ COLOR_CORRECTION_DEFAULT.) |
| 1573 | lut->color_correctioncxx . . $ $anonymous_type_b1e744064c9709f4_7#color_correction. = |
| 1574 | (get_color_correction_by_tagcxx . . $ get_color_correction_by_tag(61c60195be480a6e). |
| 1575 | (lut->output_color_descriptioncxx . . $ $anonymous_type_b1e744064c9709f4_7#output_color_description.->default_correctioncxx . . $ $anonymous_type_b1e744064c9709f4_5#default_correction.)); |
| 1576 | |
| 1577 | stpi_compute_lutcxx . . $ stpi_compute_lut(1a97b8462f9f913c).(v); |
| 1578 | |
| 1579 | lut->image_widthcxx . . $ $anonymous_type_b1e744064c9709f4_7#image_width. = stp_image_widthcxx . . $ stp_image_width(ba31fd85910919f2).(image); |
| 1580 | total_channel_bits = lut->in_channelscxx . . $ $anonymous_type_b1e744064c9709f4_7#in_channels. * lut->channel_depthcxx . . $ $anonymous_type_b1e744064c9709f4_7#channel_depth.; |
| 1581 | lut->in_datacxx . . $ $anonymous_type_b1e744064c9709f4_7#in_data. = stp_malloccxx . . $ stp_malloc(bfcfa4d6b7f7ef64).(((lut->image_widthcxx . . $ $anonymous_type_b1e744064c9709f4_7#image_width. * total_channel_bits) + 7)/8); |
| 1582 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(lut->in_datacxx . . $ $anonymous_type_b1e744064c9709f4_7#in_data., 0, ((lut->image_widthcxx . . $ $anonymous_type_b1e744064c9709f4_7#image_width. * total_channel_bits) + 7) / 8); |
| 1583 | return lut->out_channelscxx . . $ $anonymous_type_b1e744064c9709f4_7#out_channels.; |
| 1584 | } |
| 1585 | |
| 1586 | static void |
| 1587 | initialize_standard_curvescxx . . $ initialize_standard_curves(49f6e7a06ebc5aa8).(void) |
| 1588 | { |
| 1589 | if (!standard_curves_initializedcxx . . $ standard_curves_initialized.) |
| 1590 | { |
| 1591 | int i; |
| 1592 | hue_map_boundscxx . . $ hue_map_bounds. = stp_curve_create_from_stringcxx . . $ stp_curve_create_from_string(fc1a54117bc5f637). |
| 1593 | ("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" |
| 1594 | "<gutenprint>\n" |
| 1595 | "<curve wrap=\"wrap\" type=\"linear\" gamma=\"0\">\n" |
| 1596 | "<sequence count=\"2\" lower-bound=\"-6\" upper-bound=\"6\">\n" |
| 1597 | "0 0\n" |
| 1598 | "</sequence>\n" |
| 1599 | "</curve>\n" |
| 1600 | "</gutenprint>"); |
| 1601 | lum_map_boundscxx . . $ lum_map_bounds. = stp_curve_create_from_stringcxx . . $ stp_curve_create_from_string(fc1a54117bc5f637). |
| 1602 | ("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" |
| 1603 | "<gutenprint>\n" |
| 1604 | "<curve wrap=\"wrap\" type=\"linear\" gamma=\"0\">\n" |
| 1605 | "<sequence count=\"2\" lower-bound=\"0\" upper-bound=\"4\">\n" |
| 1606 | "1 1\n" |
| 1607 | "</sequence>\n" |
| 1608 | "</curve>\n" |
| 1609 | "</gutenprint>"); |
| 1610 | sat_map_boundscxx . . $ sat_map_bounds. = stp_curve_create_from_stringcxx . . $ stp_curve_create_from_string(fc1a54117bc5f637). |
| 1611 | ("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" |
| 1612 | "<gutenprint>\n" |
| 1613 | "<curve wrap=\"wrap\" type=\"linear\" gamma=\"0\">\n" |
| 1614 | "<sequence count=\"2\" lower-bound=\"0\" upper-bound=\"4\">\n" |
| 1615 | "1 1\n" |
| 1616 | "</sequence>\n" |
| 1617 | "</curve>\n" |
| 1618 | "</gutenprint>"); |
| 1619 | color_curve_boundscxx . . $ color_curve_bounds. = stp_curve_create_from_stringcxx . . $ stp_curve_create_from_string(fc1a54117bc5f637). |
| 1620 | ("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" |
| 1621 | "<gutenprint>\n" |
| 1622 | "<curve wrap=\"nowrap\" type=\"linear\" gamma=\"1.0\">\n" |
| 1623 | "<sequence count=\"0\" lower-bound=\"0\" upper-bound=\"1\">\n" |
| 1624 | "</sequence>\n" |
| 1625 | "</curve>\n" |
| 1626 | "</gutenprint>"); |
| 1627 | gcr_curve_boundscxx . . $ gcr_curve_bounds. = stp_curve_create_from_stringcxx . . $ stp_curve_create_from_string(fc1a54117bc5f637). |
| 1628 | ("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" |
| 1629 | "<gutenprint>\n" |
| 1630 | "<curve wrap=\"nowrap\" type=\"linear\" gamma=\"0.0\">\n" |
| 1631 | "<sequence count=\"2\" lower-bound=\"0\" upper-bound=\"1\">\n" |
| 1632 | "1 1\n" |
| 1633 | "</sequence>\n" |
| 1634 | "</curve>\n" |
| 1635 | "</gutenprint>"); |
| 1636 | for (i = 0; i < curve_parameter_countcxx . . $ curve_parameter_count.; i++) |
| 1637 | curve_parameterscxx . . $ curve_parameters.[i].paramcxx . . $ $anonymous_type_edce4fe85e1ab4c7_1#param..defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..curvecxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#curve. = |
| 1638 | *(curve_parameterscxx . . $ curve_parameters.[i].defvalcxx . . $ $anonymous_type_edce4fe85e1ab4c7_1#defval.); |
| 1639 | standard_curves_initializedcxx . . $ standard_curves_initialized. = 1; |
| 1640 | } |
| 1641 | } |
| 1642 | |
| 1643 | static stp_parameter_list_tcxx . . $ stp_parameter_list_t# |
| 1644 | stpi_color_traditional_list_parameterscxx . . $ stpi_color_traditional_list_parameters(817585d40f809196).(const stp_vars_tcxx . . $ stp_vars_t# *v) |
| 1645 | { |
| 1646 | stp_list_tcxx . . $ stp_list_t# *ret = stp_parameter_list_createcxx . . $ stp_parameter_list_create(50c7df7de5344ebb).(); |
| 1647 | int i; |
| 1648 | (void)v; |
| 1649 | |
| 1650 | initialize_standard_curvescxx . . $ initialize_standard_curves(49f6e7a06ebc5aa8).(); |
| 1651 | for (i = 0; i < float_parameter_countcxx . . $ float_parameter_count.; i++) |
| 1652 | stp_parameter_list_add_paramcxx . . $ stp_parameter_list_add_param(9dab94dbd10bbd1f).(ret, &(float_parameterscxx . . $ float_parameters.[i].paramcxx . . $ $anonymous_type_edce4fe85e1ab4c7_0#param.)); |
| 1653 | for (i = 0; i < curve_parameter_countcxx . . $ curve_parameter_count.; i++) |
| 1654 | stp_parameter_list_add_paramcxx . . $ stp_parameter_list_add_param(9dab94dbd10bbd1f).(ret, &(curve_parameterscxx . . $ curve_parameters.[i].paramcxx . . $ $anonymous_type_edce4fe85e1ab4c7_1#param.)); |
| 1655 | return ret; |
| 1656 | } |
| 1657 | |
| 1658 | static void |
| 1659 | stpi_color_traditional_describe_parametercxx . . $ stpi_color_traditional_describe_parameter(dfd5b9531b51a6d2).(const stp_vars_tcxx . . $ stp_vars_t# *v, |
| 1660 | const char *name, |
| 1661 | stp_parameter_tcxx . . $ stp_parameter_t# *description) |
| 1662 | { |
| 1663 | int i, j; |
| 1664 | description->p_typecxx . . $ $anonymous_type_c987533f3b833c82_8#p_type. = STP_PARAMETER_TYPE_INVALIDcxx . . $ STP_PARAMETER_TYPE_INVALID.; |
| 1665 | initialize_standard_curvescxx . . $ initialize_standard_curves(49f6e7a06ebc5aa8).(); |
| 1666 | if (name == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1667 | return; |
| 1668 | |
| 1669 | for (i = 0; i < float_parameter_countcxx . . $ float_parameter_count.; i++) |
| 1670 | { |
| 1671 | const float_param_tcxx . . $ float_param_t# *param = &(float_parameterscxx . . $ float_parameters.[i]); |
| 1672 | if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(name, param->paramcxx . . $ $anonymous_type_edce4fe85e1ab4c7_0#param..namecxx . . $ $anonymous_type_c987533f3b833c82_8#name.) == 0) |
| 1673 | { |
| 1674 | stp_fill_parameter_settingscxx . . $ stp_fill_parameter_settings(bb1f9d668495a4b4).(description, &(param->paramcxx . . $ $anonymous_type_edce4fe85e1ab4c7_0#param.)); |
| 1675 | if (param->channel_maskcxx . . $ $anonymous_type_edce4fe85e1ab4c7_0#channel_mask. != CMASK_EVERYcxx . . $ `src/main/color-conversion.h:103:9`!) |
| 1676 | { |
| 1677 | const color_description_tcxx . . $ color_description_t# *color_description = |
| 1678 | get_color_descriptioncxx . . $ get_color_description(f61840fb2058e480).(stp_describe_outputcxx . . $ stp_describe_output(4be828c28602b542).(v)); |
| 1679 | if (color_description && |
| 1680 | (param->channel_maskcxx . . $ $anonymous_type_edce4fe85e1ab4c7_0#channel_mask. & color_description->channelscxx . . $ $anonymous_type_b1e744064c9709f4_5#channels.) && |
| 1681 | (param->is_rgbcxx . . $ $anonymous_type_edce4fe85e1ab4c7_0#is_rgb. < 0 || |
| 1682 | (param->is_rgbcxx . . $ $anonymous_type_edce4fe85e1ab4c7_0#is_rgb. == 0 && |
| 1683 | color_description->color_modelcxx . . $ $anonymous_type_b1e744064c9709f4_5#color_model. == COLOR_BLACKcxx . . $ COLOR_BLACK.) || |
| 1684 | (param->is_rgbcxx . . $ $anonymous_type_edce4fe85e1ab4c7_0#is_rgb. == 1 && |
| 1685 | color_description->color_modelcxx . . $ $anonymous_type_b1e744064c9709f4_5#color_model. == COLOR_WHITEcxx . . $ COLOR_WHITE.)) && |
| 1686 | param->channel_maskcxx . . $ $anonymous_type_edce4fe85e1ab4c7_0#channel_mask. != CMASK_RAWcxx . . $ `src/main/color-conversion.h:82:9`!) |
| 1687 | description->is_activecxx . . $ $anonymous_type_c987533f3b833c82_8#is_active. = 1; |
| 1688 | else |
| 1689 | description->is_activecxx . . $ $anonymous_type_c987533f3b833c82_8#is_active. = 0; |
| 1690 | if (param->color_onlycxx . . $ $anonymous_type_edce4fe85e1ab4c7_0#color_only. && color_description && |
| 1691 | !(color_description->channelscxx . . $ $anonymous_type_b1e744064c9709f4_5#channels. & ~CMASK_Kcxx . . $ `src/main/color-conversion.h:74:9`!)) |
| 1692 | description->is_activecxx . . $ $anonymous_type_c987533f3b833c82_8#is_active. = 0; |
| 1693 | } |
| 1694 | switch (param->paramcxx . . $ $anonymous_type_edce4fe85e1ab4c7_0#param..p_typecxx . . $ $anonymous_type_c987533f3b833c82_8#p_type.) |
| 1695 | { |
| 1696 | case STP_PARAMETER_TYPE_BOOLEANcxx . . $ STP_PARAMETER_TYPE_BOOLEAN.: |
| 1697 | description->defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..booleancxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#boolean. = (int) param->defvalcxx . . $ $anonymous_type_edce4fe85e1ab4c7_0#defval.; |
| 1698 | break; |
| 1699 | case STP_PARAMETER_TYPE_INTcxx . . $ STP_PARAMETER_TYPE_INT.: |
| 1700 | description->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..integercxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#integer..uppercxx . . $ $anonymous_type_c987533f3b833c82_6#upper. = (int) param->maxcxx . . $ $anonymous_type_edce4fe85e1ab4c7_0#max.; |
| 1701 | description->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..integercxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#integer..lowercxx . . $ $anonymous_type_c987533f3b833c82_6#lower. = (int) param->mincxx . . $ $anonymous_type_edce4fe85e1ab4c7_0#min.; |
| 1702 | description->defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..integercxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#integer. = (int) param->defvalcxx . . $ $anonymous_type_edce4fe85e1ab4c7_0#defval.; |
| 1703 | break; |
| 1704 | case STP_PARAMETER_TYPE_DOUBLEcxx . . $ STP_PARAMETER_TYPE_DOUBLE.: |
| 1705 | description->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..dblcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#dbl..uppercxx . . $ $anonymous_type_c987533f3b833c82_5#upper. = param->maxcxx . . $ $anonymous_type_edce4fe85e1ab4c7_0#max.; |
| 1706 | description->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..dblcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#dbl..lowercxx . . $ $anonymous_type_c987533f3b833c82_5#lower. = param->mincxx . . $ $anonymous_type_edce4fe85e1ab4c7_0#min.; |
| 1707 | description->defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..dblcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#dbl. = param->defvalcxx . . $ $anonymous_type_edce4fe85e1ab4c7_0#defval.; |
| 1708 | if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(name, "InkLimit") == 0) |
| 1709 | { |
| 1710 | stp_parameter_tcxx . . $ stp_parameter_t# ink_limit_desc; |
| 1711 | stp_describe_parametercxx . . $ stp_describe_parameter(dfd5b9531b51a6d2).(v, "InkChannels", &ink_limit_desc); |
| 1712 | if (ink_limit_desc.p_typecxx . . $ $anonymous_type_c987533f3b833c82_8#p_type. == STP_PARAMETER_TYPE_INTcxx . . $ STP_PARAMETER_TYPE_INT. && |
| 1713 | ink_limit_desc.defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..integercxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#integer. > 1) |
| 1714 | { |
| 1715 | description->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..dblcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#dbl..uppercxx . . $ $anonymous_type_c987533f3b833c82_5#upper. = |
| 1716 | ink_limit_desc.defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..integercxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#integer.; |
| 1717 | description->defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..dblcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#dbl. = |
| 1718 | ink_limit_desc.defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..integercxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#integer.; |
| 1719 | } |
| 1720 | else |
| 1721 | description->is_activecxx . . $ $anonymous_type_c987533f3b833c82_8#is_active. = 0; |
| 1722 | |
| 1723 | stp_parameter_description_destroycxx . . $ stp_parameter_description_destroy(6259b4d9050bb586).(&ink_limit_desc); |
| 1724 | } |
| 1725 | break; |
| 1726 | case STP_PARAMETER_TYPE_STRING_LISTcxx . . $ STP_PARAMETER_TYPE_STRING_LIST.: |
| 1727 | if (!strcmpcxx . . $ strcmp(5ae29d726ae57f88).(param->paramcxx . . $ $anonymous_type_edce4fe85e1ab4c7_0#param..namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., "ColorCorrection")) |
| 1728 | { |
| 1729 | description->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str. = stp_string_list_createcxx . . $ stp_string_list_create(f262b3b5e10fad14).(); |
| 1730 | for (j = 0; j < color_correction_countcxx . . $ color_correction_count.; j++) |
| 1731 | stp_string_list_add_stringcxx . . $ stp_string_list_add_string(61ec312b340c2952). |
| 1732 | (description->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str., color_correctionscxx . . $ color_corrections.[j].namecxx . . $ $anonymous_type_b1e744064c9709f4_1#name., |
| 1733 | gettextcxx . . $ `include/gutenprint/gutenprint-intl-internal.h:61:11`!(color_corrections[j].text)); |
| 1734 | description->defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#str. = |
| 1735 | stp_string_list_paramcxx . . $ stp_string_list_param(1d71fb1c8ad3926a).(description->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str., 0)->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name.; |
| 1736 | } |
| 1737 | else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(name, "ChannelBitDepth") == 0) |
| 1738 | { |
| 1739 | description->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str. = stp_string_list_createcxx . . $ stp_string_list_create(f262b3b5e10fad14).(); |
| 1740 | for (j = 0; j < channel_depth_countcxx . . $ channel_depth_count.; j++) |
| 1741 | stp_string_list_add_stringcxx . . $ stp_string_list_add_string(61ec312b340c2952). |
| 1742 | (description->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str., channel_depthscxx . . $ channel_depths.[j].namecxx . . $ $anonymous_type_b1e744064c9709f4_6#name., |
| 1743 | channel_depthscxx . . $ channel_depths.[j].namecxx . . $ $anonymous_type_b1e744064c9709f4_6#name.); |
| 1744 | description->defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#str. = |
| 1745 | stp_string_list_paramcxx . . $ stp_string_list_param(1d71fb1c8ad3926a).(description->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str., 0)->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name.; |
| 1746 | } |
| 1747 | else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(name, "InputImageType") == 0) |
| 1748 | { |
| 1749 | description->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str. = stp_string_list_createcxx . . $ stp_string_list_create(f262b3b5e10fad14).(); |
| 1750 | for (j = 0; j < color_description_countcxx . . $ color_description_count.; j++) |
| 1751 | if (color_descriptionscxx . . $ color_descriptions.[j].inputcxx . . $ $anonymous_type_b1e744064c9709f4_5#input.) |
| 1752 | { |
| 1753 | if (color_descriptionscxx . . $ color_descriptions.[j].color_idcxx . . $ $anonymous_type_b1e744064c9709f4_5#color_id. == COLOR_ID_RAWcxx . . $ COLOR_ID_RAW.) |
| 1754 | { |
| 1755 | stp_parameter_tcxx . . $ stp_parameter_t# desc; |
| 1756 | stp_describe_parametercxx . . $ stp_describe_parameter(dfd5b9531b51a6d2).(v, "RawChannels", &desc); |
| 1757 | if (desc.p_typecxx . . $ $anonymous_type_c987533f3b833c82_8#p_type. == STP_PARAMETER_TYPE_STRING_LISTcxx . . $ STP_PARAMETER_TYPE_STRING_LIST.) |
| 1758 | stp_string_list_add_stringcxx . . $ stp_string_list_add_string(61ec312b340c2952). |
| 1759 | (description->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str., |
| 1760 | color_descriptionscxx . . $ color_descriptions.[j].namecxx . . $ $anonymous_type_b1e744064c9709f4_5#name., |
| 1761 | gettextcxx . . $ `include/gutenprint/gutenprint-intl-internal.h:61:11`!(color_descriptions[j].name)); |
| 1762 | stp_parameter_description_destroycxx . . $ stp_parameter_description_destroy(6259b4d9050bb586).(&desc); |
| 1763 | } |
| 1764 | else |
| 1765 | stp_string_list_add_stringcxx . . $ stp_string_list_add_string(61ec312b340c2952). |
| 1766 | (description->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str., |
| 1767 | color_descriptionscxx . . $ color_descriptions.[j].namecxx . . $ $anonymous_type_b1e744064c9709f4_5#name., |
| 1768 | gettextcxx . . $ `include/gutenprint/gutenprint-intl-internal.h:61:11`!(color_descriptions[j].name)); |
| 1769 | } |
| 1770 | description->defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#str. = |
| 1771 | stp_string_list_paramcxx . . $ stp_string_list_param(1d71fb1c8ad3926a).(description->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str., 0)->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name.; |
| 1772 | } |
| 1773 | else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(name, "OutputImageType") == 0) |
| 1774 | { |
| 1775 | description->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str. = stp_string_list_createcxx . . $ stp_string_list_create(f262b3b5e10fad14).(); |
| 1776 | for (j = 0; j < color_description_countcxx . . $ color_description_count.; j++) |
| 1777 | if (color_descriptionscxx . . $ color_descriptions.[j].outputcxx . . $ $anonymous_type_b1e744064c9709f4_5#output.) |
| 1778 | stp_string_list_add_stringcxx . . $ stp_string_list_add_string(61ec312b340c2952). |
| 1779 | (description->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str., color_descriptionscxx . . $ color_descriptions.[j].namecxx . . $ $anonymous_type_b1e744064c9709f4_5#name., |
| 1780 | gettextcxx . . $ `include/gutenprint/gutenprint-intl-internal.h:61:11`!(color_descriptions[j].name)); |
| 1781 | description->defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#str. = |
| 1782 | stp_string_list_paramcxx . . $ stp_string_list_param(1d71fb1c8ad3926a).(description->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str., 0)->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name.; |
| 1783 | } |
| 1784 | break; |
| 1785 | default: |
| 1786 | break; |
| 1787 | } |
| 1788 | return; |
| 1789 | } |
| 1790 | } |
| 1791 | for (i = 0; i < curve_parameter_countcxx . . $ curve_parameter_count.; i++) |
| 1792 | { |
| 1793 | curve_param_tcxx . . $ curve_param_t# *param = &(curve_parameterscxx . . $ curve_parameters.[i]); |
| 1794 | if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(name, param->paramcxx . . $ $anonymous_type_edce4fe85e1ab4c7_1#param..namecxx . . $ $anonymous_type_c987533f3b833c82_8#name.) == 0) |
| 1795 | { |
| 1796 | description->is_activecxx . . $ $anonymous_type_c987533f3b833c82_8#is_active. = 1; |
| 1797 | stp_fill_parameter_settingscxx . . $ stp_fill_parameter_settings(bb1f9d668495a4b4).(description, &(param->paramcxx . . $ $anonymous_type_edce4fe85e1ab4c7_1#param.)); |
| 1798 | if (param->channel_maskcxx . . $ $anonymous_type_edce4fe85e1ab4c7_1#channel_mask. != CMASK_EVERYcxx . . $ `src/main/color-conversion.h:103:9`!) |
| 1799 | { |
| 1800 | const color_description_tcxx . . $ color_description_t# *color_description = |
| 1801 | get_color_descriptioncxx . . $ get_color_description(f61840fb2058e480).(stp_describe_outputcxx . . $ stp_describe_output(4be828c28602b542).(v)); |
| 1802 | if (color_description && |
| 1803 | (param->is_rgbcxx . . $ $anonymous_type_edce4fe85e1ab4c7_1#is_rgb. < 0 || |
| 1804 | (param->is_rgbcxx . . $ $anonymous_type_edce4fe85e1ab4c7_1#is_rgb. == 0 && |
| 1805 | color_description->color_modelcxx . . $ $anonymous_type_b1e744064c9709f4_5#color_model. == COLOR_BLACKcxx . . $ COLOR_BLACK.) || |
| 1806 | (param->is_rgbcxx . . $ $anonymous_type_edce4fe85e1ab4c7_1#is_rgb. == 1 && |
| 1807 | color_description->color_modelcxx . . $ $anonymous_type_b1e744064c9709f4_5#color_model. == COLOR_WHITEcxx . . $ COLOR_WHITE.)) && |
| 1808 | (param->channel_maskcxx . . $ $anonymous_type_edce4fe85e1ab4c7_1#channel_mask. & color_description->channelscxx . . $ $anonymous_type_b1e744064c9709f4_5#channels.)) |
| 1809 | description->is_activecxx . . $ $anonymous_type_c987533f3b833c82_8#is_active. = 1; |
| 1810 | else |
| 1811 | description->is_activecxx . . $ $anonymous_type_c987533f3b833c82_8#is_active. = 0; |
| 1812 | if (param->color_onlycxx . . $ $anonymous_type_edce4fe85e1ab4c7_1#color_only. && color_description && |
| 1813 | !(color_description->channelscxx . . $ $anonymous_type_b1e744064c9709f4_5#channels. & ~CMASK_Kcxx . . $ `src/main/color-conversion.h:74:9`!)) |
| 1814 | description->is_activecxx . . $ $anonymous_type_c987533f3b833c82_8#is_active. = 0; |
| 1815 | } |
| 1816 | if (param->hsl_onlycxx . . $ $anonymous_type_edce4fe85e1ab4c7_1#hsl_only.) |
| 1817 | { |
| 1818 | const color_correction_tcxx . . $ color_correction_t# *correction = |
| 1819 | (get_color_correctioncxx . . $ get_color_correction(2e72bd2e7c2093d6). |
| 1820 | (stp_get_string_parametercxx . . $ stp_get_string_parameter(3e3ce5d385745545). (v, "ColorCorrection"))); |
| 1821 | if (correction && !correction->correct_hslcxx . . $ $anonymous_type_b1e744064c9709f4_1#correct_hsl.) |
| 1822 | description->is_activecxx . . $ $anonymous_type_c987533f3b833c82_8#is_active. = 0; |
| 1823 | } |
| 1824 | switch (param->paramcxx . . $ $anonymous_type_edce4fe85e1ab4c7_1#param..p_typecxx . . $ $anonymous_type_c987533f3b833c82_8#p_type.) |
| 1825 | { |
| 1826 | case STP_PARAMETER_TYPE_CURVEcxx . . $ STP_PARAMETER_TYPE_CURVE.: |
| 1827 | description->defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..curvecxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#curve. = *(param->defvalcxx . . $ $anonymous_type_edce4fe85e1ab4c7_1#defval.); |
| 1828 | description->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..curvecxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#curve. = |
| 1829 | stp_curve_create_copycxx . . $ stp_curve_create_copy(df54bc0b812d6ee).(*(param->defvalcxx . . $ $anonymous_type_edce4fe85e1ab4c7_1#defval.)); |
| 1830 | break; |
| 1831 | default: |
| 1832 | break; |
| 1833 | } |
| 1834 | return; |
| 1835 | } |
| 1836 | } |
| 1837 | } |
| 1838 | |
| 1839 | |
| 1840 | static const stp_colorfuncs_tcxx . . $ stp_colorfuncs_t# stpi_color_traditional_colorfuncscxx . . $ stpi_color_traditional_colorfuncs. = |
| 1841 | { |
| 1842 | &stpi_color_traditional_initcxx . . $ stpi_color_traditional_init(8474e95f5358b69d)., |
| 1843 | &stpi_color_traditional_get_rowcxx . . $ stpi_color_traditional_get_row(ba7b466a9562988e)., |
| 1844 | &stpi_color_traditional_list_parameterscxx . . $ stpi_color_traditional_list_parameters(817585d40f809196)., |
| 1845 | &stpi_color_traditional_describe_parametercxx . . $ stpi_color_traditional_describe_parameter(dfd5b9531b51a6d2). |
| 1846 | }; |
| 1847 | |
| 1848 | static stp_color_tcxx . . $ stp_color_t# stpi_color_traditional_module_datacxx . . $ stpi_color_traditional_module_data. = |
| 1849 | { |
| 1850 | "traditional", |
| 1851 | N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Traditional Gutenprint color conversion"), |
| 1852 | &stpi_color_traditional_colorfuncscxx . . $ stpi_color_traditional_colorfuncs. |
| 1853 | }; |
| 1854 | |
| 1855 | |
| 1856 | static int |
| 1857 | color_traditional_module_initcxx . . $ color_traditional_module_init(b126dc7c1de90089).(void) |
| 1858 | { |
| 1859 | return stp_color_registercxx . . $ stp_color_register(ab934adf54b95da0).(&stpi_color_traditional_module_datacxx . . $ stpi_color_traditional_module_data.); |
| 1860 | } |
| 1861 | |
| 1862 | |
| 1863 | static int |
| 1864 | color_traditional_module_exitcxx . . $ color_traditional_module_exit(b126dc7c1de90089).(void) |
| 1865 | { |
| 1866 | return stp_color_unregistercxx . . $ stp_color_unregister(ab934adf54b95da0).(&stpi_color_traditional_module_datacxx . . $ stpi_color_traditional_module_data.); |
| 1867 | } |
| 1868 | |
| 1869 | |
| 1870 | /* Module header */ |
| 1871 | #define stp_module_versioncxx . . $ `src/main/print-color.c:1871:9`! color_traditional_LTX_stp_module_version |
| 1872 | #define stp_module_datacxx . . $ `src/main/print-color.c:1872:9`! color_traditional_LTX_stp_module_data |
| 1873 | |
| 1874 | stp_module_version_tcxx . . $ stp_module_version_t# stp_module_versioncxx . . $ `src/main/print-color.c:1871:9`! = {0, 0}; |
| 1875 | |
| 1876 | stp_module_tcxx . . $ stp_module_t# stp_module_datacxx . . $ `src/main/print-color.c:1872:9`! = |
| 1877 | { |
| 1878 | "traditional", |
| 1879 | VERSIONcxx . . $ `../../config.h:204:9`!, |
| 1880 | "Traditional Gutenprint color conversion", |
| 1881 | STP_MODULE_CLASS_COLORcxx . . $ STP_MODULE_CLASS_COLOR., |
| 1882 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 1883 | color_traditional_module_initcxx . . $ color_traditional_module_init(b126dc7c1de90089)., |
| 1884 | color_traditional_module_exitcxx . . $ color_traditional_module_exit(b126dc7c1de90089)., |
| 1885 | (void *) &stpi_color_traditional_module_datacxx . . $ stpi_color_traditional_module_data. |
| 1886 | }; |