diff options
author | Roger Leigh <rleigh@debian.org> | 2008-10-26 16:11:56 +0000 |
---|---|---|
committer | Roger Leigh <rleigh@debian.org> | 2008-10-26 16:11:56 +0000 |
commit | 7e12d32a372b5661f80b68009730cf47a6bfd062 (patch) | |
tree | 821ddd7a41794bb6fec964ce81ba89a13cebb20a /src/main | |
parent | dfae5860833782af557deb35e286d7e186fe3cf5 (diff) |
Imported Upstream version 4.3.99+cvs20050715
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/Makefile.in | 1 | ||||
-rw-r--r-- | src/main/channel.c | 171 | ||||
-rw-r--r-- | src/main/color-conversion.h | 3 | ||||
-rw-r--r-- | src/main/color-conversions.c | 115 | ||||
-rw-r--r-- | src/main/escp2-channels.c | 14 | ||||
-rw-r--r-- | src/main/escp2-papers.c | 90 | ||||
-rw-r--r-- | src/main/print-canon.c | 18 | ||||
-rw-r--r-- | src/main/print-color.c | 67 | ||||
-rw-r--r-- | src/main/print-escp2.c | 50 | ||||
-rw-r--r-- | src/main/print-lexmark.c | 18 | ||||
-rw-r--r-- | src/main/print-pcl.c | 18 |
11 files changed, 303 insertions, 262 deletions
diff --git a/src/main/Makefile.in b/src/main/Makefile.in index 4eeda81..1bd64de 100644 --- a/src/main/Makefile.in +++ b/src/main/Makefile.in @@ -368,7 +368,6 @@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ -ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ diff --git a/src/main/channel.c b/src/main/channel.c index ca676bb..88d316d 100644 --- a/src/main/channel.c +++ b/src/main/channel.c @@ -1,5 +1,5 @@ /* - * "$Id: channel.c,v 1.26 2005/06/14 02:49:09 rlk Exp $" + * "$Id: channel.c,v 1.29 2005/07/14 23:43:30 rlk Exp $" * * Dither routine entrypoints * @@ -67,15 +67,19 @@ typedef struct unsigned channel_count; unsigned total_channels; unsigned input_channels; + unsigned gcr_channels; + unsigned aux_output_channels; size_t width; int initialized; unsigned ink_limit; unsigned max_density; stpi_channel_t *c; + stp_curve_t *gcr_curve; unsigned curve_count; unsigned gloss_limit; unsigned short *input_data; unsigned short *multi_tmp; + unsigned short *gcr_data; unsigned short *split_input; unsigned short *output_data; unsigned short *alloc_data_1; @@ -116,8 +120,14 @@ stpi_channel_clear(void *vc) STP_SAFE_FREE(cg->alloc_data_2); STP_SAFE_FREE(cg->alloc_data_3); STP_SAFE_FREE(cg->c); + if (cg->gcr_curve) + { + stp_curve_destroy(cg->gcr_curve); + cg->gcr_curve = NULL; + } cg->channel_count = 0; cg->curve_count = 0; + cg->aux_output_channels = 0; cg->total_channels = 0; cg->input_channels = 0; cg->initialized = 0; @@ -338,6 +348,31 @@ stp_channel_get_cutoff_adjustment(stp_vars_t *v, int color, int subchannel) } void +stp_channel_set_gcr_curve(stp_vars_t *v, const stp_curve_t *curve) +{ + stpi_channel_group_t *cg = + ((stpi_channel_group_t *) stp_get_component_data(v, "Channel")); + if (!cg) + return; + stp_dprintf(STP_DBG_INK, v, "set_gcr_curve\n"); + if (curve) + cg->gcr_curve = stp_curve_create_copy(curve); + else + cg->gcr_curve = NULL; +} + +const stp_curve_t * +stp_channel_get_gcr_curve(stp_vars_t *v) +{ + stpi_channel_group_t *cg = + ((stpi_channel_group_t *) stp_get_component_data(v, "Channel")); + if (!cg) + return NULL; + stp_dprintf(STP_DBG_INK, v, "set_gcr_curve\n"); + return cg->gcr_curve; +} + +void stp_channel_set_curve(stp_vars_t *v, int color, const stp_curve_t *curve) { stpi_channel_t *ch; @@ -380,6 +415,14 @@ input_has_special_channels(const stp_vars_t *v) } static int +output_needs_gcr(const stp_vars_t *v) +{ + const stpi_channel_group_t *cg = + ((const stpi_channel_group_t *) stp_get_component_data(v, "Channel")); + return (cg->gcr_curve && cg->black_channel == 0); +} + +static int output_has_gloss(const stp_vars_t *v) { const stpi_channel_group_t *cg = @@ -393,7 +436,7 @@ input_needs_splitting(const stp_vars_t *v) const stpi_channel_group_t *cg = ((const stpi_channel_group_t *) stp_get_component_data(v, "Channel")); #if 0 - return cg->total_channels != cg->input_channels; + return cg->total_channels != cg->aux_output_channels; #else int i; if (!cg || cg->channel_count <= 0) @@ -474,6 +517,8 @@ stp_channel_initialize(stp_vars_t *v, stp_image_t *image, double lower_val = base * (1.0 - where); double lower_amount = lower_val / this_val; double upper_amount = (val - lower_val) / next_val; + if (lower_amount > 65535.0) + lower_amount = 65535.0; c->lut[val * sc + sc - k - 2] = upper_amount; c->lut[val * sc + sc - k - 1] = lower_amount; val++; @@ -485,6 +530,8 @@ stp_channel_initialize(stp_vars_t *v, stp_image_t *image, val++; } } + if (cg->gloss_channel != i && c->subchannel_count > 0) + cg->aux_output_channels++; cg->total_channels += c->subchannel_count; for (j = 0; j < c->subchannel_count; j++) cg->max_density += c->sc[j].s_density; @@ -506,21 +553,29 @@ stp_channel_initialize(stp_vars_t *v, stp_image_t *image, cg->output_data = cg->alloc_data_1; if (curve_count == 0) { + cg->gcr_channels = cg->input_channels; if (input_needs_splitting(v)) { cg->alloc_data_2 = stp_malloc(sizeof(unsigned short) * cg->input_channels * width); cg->input_data = cg->alloc_data_2; cg->split_input = cg->input_data; + cg->gcr_data = cg->split_input; } else if (cg->gloss_channel != -1) { cg->alloc_data_2 = stp_malloc(sizeof(unsigned short) * cg->input_channels * width); cg->input_data = cg->alloc_data_2; + cg->gcr_data = cg->output_data; + cg->gcr_channels = cg->total_channels; } else - cg->input_data = cg->output_data; + { + cg->input_data = cg->output_data; + cg->gcr_data = cg->output_data; + } + cg->aux_output_channels = cg->gcr_channels; } else { @@ -530,19 +585,25 @@ stp_channel_initialize(stp_vars_t *v, stp_image_t *image, if (input_needs_splitting(v)) { cg->alloc_data_3 = - stp_malloc(sizeof(unsigned short) * cg->channel_count * width); + stp_malloc(sizeof(unsigned short) * cg->aux_output_channels * width); cg->multi_tmp = cg->alloc_data_3; cg->split_input = cg->multi_tmp; + cg->gcr_data = cg->split_input; } else { cg->multi_tmp = cg->alloc_data_1; + cg->gcr_data = cg->output_data; + cg->aux_output_channels = cg->total_channels; } + cg->gcr_channels = cg->aux_output_channels; } stp_dprintf(STP_DBG_INK, v, "stp_channel_initialize:\n"); stp_dprintf(STP_DBG_INK, v, " channel_count %d\n", cg->channel_count); stp_dprintf(STP_DBG_INK, v, " total_channels %d\n", cg->total_channels); stp_dprintf(STP_DBG_INK, v, " input_channels %d\n", cg->input_channels); + stp_dprintf(STP_DBG_INK, v, " aux_channels %d\n", cg->aux_output_channels); + stp_dprintf(STP_DBG_INK, v, " gcr_channels %d\n", cg->gcr_channels); stp_dprintf(STP_DBG_INK, v, " width %d\n", cg->width); stp_dprintf(STP_DBG_INK, v, " ink_limit %d\n", cg->ink_limit); stp_dprintf(STP_DBG_INK, v, " gloss_limit %d\n", cg->gloss_limit); @@ -550,6 +611,7 @@ stp_channel_initialize(stp_vars_t *v, stp_image_t *image, stp_dprintf(STP_DBG_INK, v, " curve_count %d\n", cg->curve_count); stp_dprintf(STP_DBG_INK, v, " black_channel %d\n", cg->black_channel); stp_dprintf(STP_DBG_INK, v, " gloss_channel %d\n", cg->gloss_channel); + stp_dprintf(STP_DBG_INK, v, " gloss_physical %d\n", cg->gloss_physical_channel); stp_dprintf(STP_DBG_INK, v, " input_data %p\n", (void *) cg->input_data); stp_dprintf(STP_DBG_INK, v, " multi_tmp %p\n", @@ -558,12 +620,16 @@ stp_channel_initialize(stp_vars_t *v, stp_image_t *image, (void *) cg->split_input); stp_dprintf(STP_DBG_INK, v, " output_data %p\n", (void *) cg->output_data); + stp_dprintf(STP_DBG_INK, v, " gcr_data %p\n", + (void *) cg->gcr_data); stp_dprintf(STP_DBG_INK, v, " alloc_data_1 %p\n", (void *) cg->alloc_data_1); stp_dprintf(STP_DBG_INK, v, " alloc_data_2 %p\n", (void *) cg->alloc_data_2); stp_dprintf(STP_DBG_INK, v, " alloc_data_3 %p\n", (void *) cg->alloc_data_3); + stp_dprintf(STP_DBG_INK, v, " gcr_curve %p\n", + (void *) cg->gcr_curve); for (i = 0; i < cg->channel_count; i++) { stp_dprintf(STP_DBG_INK, v, " Channel %d:\n", i); @@ -673,13 +739,29 @@ limit_ink(const stp_vars_t *v) } static inline int -mem_eq(const unsigned short *i1, const unsigned short *i2, int count) +short_eq(const unsigned short *i1, const unsigned short *i2, size_t count) { +#if 1 int i; for (i = 0; i < count; i++) if (i1[i] != i2[i]) return 0; return 1; +#else + return !memcmp(i1, i2, count * sizeof(unsigned short)); +#endif +} + +static inline void +short_copy(unsigned short *out, const unsigned short *in, size_t count) +{ +#if 1 + int i; + for (i = 0; i < count; i++) + out[i] = in[i]; +#else + (void) memcpy(out, in, count * sizeof(unsigned short)); +#endif } static void @@ -746,19 +828,20 @@ generate_special_channels(const stp_vars_t *v) const unsigned short *output_cache = NULL; const unsigned short *input = cg->input_data; unsigned short *output = cg->multi_tmp; - int outbytes = cg->channel_count * sizeof(unsigned short); + int offset = (cg->black_channel >= 0 ? 0 : -1); + int outbytes = cg->aux_output_channels * sizeof(unsigned short); for (i = 0; i < cg->width; - input += cg->input_channels, output += cg->channel_count, i++) + input += cg->input_channels, output += cg->aux_output_channels, i++) { - if (input_cache && mem_eq(input_cache, input, cg->input_channels)) + if (input_cache && short_eq(input_cache, input, cg->input_channels)) { memcpy(output, output_cache, outbytes); } else { - int c = input[STP_ECOLOR_C]; - int m = input[STP_ECOLOR_M]; - int y = input[STP_ECOLOR_Y]; + int c = input[STP_ECOLOR_C + offset]; + int m = input[STP_ECOLOR_M + offset]; + int y = input[STP_ECOLOR_Y + offset]; int min = FMIN(c, FMIN(m, y)); int max = FMAX(c, FMAX(m, y)); if (max > min) /* Otherwise it's gray, and we don't care */ @@ -775,24 +858,28 @@ generate_special_channels(const stp_vars_t *v) m -= min; y -= min; max -= min; - output[STP_ECOLOR_K] = input[STP_ECOLOR_K]; + if (offset == 0) + output[STP_ECOLOR_K] = input[STP_ECOLOR_K]; hue = compute_hue(c, m, y, max); - for (j = 1; j < cg->channel_count; j++) + for (j = 1; j < cg->aux_output_channels - offset; j++) { stpi_channel_t *ch = &(cg->c[j]); - output[j] = - max * interpolate_value(ch->hue_map, - hue * ch->h_count / 6.0); + if (ch->hue_map) + output[j + offset] = + max * interpolate_value(ch->hue_map, + hue * ch->h_count / 6.0); + else + output[j + offset] = 0; } - output[STP_ECOLOR_C] += min; - output[STP_ECOLOR_M] += min; - output[STP_ECOLOR_Y] += min; + output[STP_ECOLOR_C + offset] += min; + output[STP_ECOLOR_M + offset] += min; + output[STP_ECOLOR_Y + offset] += min; } else { - for (j = 0; j < 4; j++) + for (j = 0; j < 4 + offset; j++) output[j] = input[j]; - for (j = 4; j < cg->channel_count; j++) + for (j = 4 + offset; j < cg->aux_output_channels; j++) output[j] = 0; } } @@ -818,10 +905,10 @@ split_channels(const stp_vars_t *v, unsigned *zero_mask) for (i = 0; i < cg->width; i++) { int zero_ptr = 0; - if (input_cache && mem_eq(input_cache, input, cg->input_channels)) + if (input_cache && short_eq(input_cache, input, cg->aux_output_channels)) { memcpy(output, output_cache, outbytes); - input += cg->input_channels; + input += cg->aux_output_channels; output += cg->total_channels; } else @@ -832,7 +919,7 @@ split_channels(const stp_vars_t *v, unsigned *zero_mask) output_cache = output; if (cg->black_channel >= 0) black_value = input[cg->black_channel]; - for (j = 0; j < cg->channel_count; j++) + for (j = 0; j < cg->aux_output_channels; j++) { if (input[j] < virtual_black && j != cg->black_channel) virtual_black = input[j]; @@ -985,6 +1072,40 @@ generate_gloss(const stp_vars_t *v, unsigned *zero_mask) } } +static void +do_gcr(const stp_vars_t *v) +{ + stpi_channel_group_t *cg = + ((stpi_channel_group_t *) stp_get_component_data(v, "Channel")); + const unsigned short *gcr_lookup; + unsigned short *output = cg->gcr_data; + size_t count; + double cb = stp_get_float_parameter(v, "CyanBalance"); + double mb = stp_get_float_parameter(v, "MagentaBalance"); + double yb = stp_get_float_parameter(v, "YellowBalance"); + int i; + + stp_curve_resample(cg->gcr_curve, 65536); + gcr_lookup = stp_curve_get_ushort_data(cg->gcr_curve, &count); + for (i = 0; i < cg->width; i++) + { + unsigned k = output[0]; + if (k > 0) + { + int kk = gcr_lookup[k]; + int ck; + if (kk > k) + kk = k; + ck = k - kk; + output[0] = kk; + output[1] += ck * cb; + output[2] += ck * mb; + output[3] += ck * yb; + } + output += cg->gcr_channels; + } +} + void stp_channel_convert(const stp_vars_t *v, unsigned *zero_mask) { @@ -992,6 +1113,8 @@ stp_channel_convert(const stp_vars_t *v, unsigned *zero_mask) generate_special_channels(v); else if (output_has_gloss(v) && !input_needs_splitting(v)) copy_channels(v); + if (output_needs_gcr(v)) + do_gcr(v); if (input_needs_splitting(v)) split_channels(v, zero_mask); else diff --git a/src/main/color-conversion.h b/src/main/color-conversion.h index ed87811..28deb53 100644 --- a/src/main/color-conversion.h +++ b/src/main/color-conversion.h @@ -1,5 +1,5 @@ /* - * "$Id: color-conversion.h,v 1.9 2005/06/30 01:34:58 rlk Exp $" + * "$Id: color-conversion.h,v 1.10 2005/07/04 00:23:54 rlk Exp $" * * Gutenprint color management module - traditional Gimp-Print algorithm. * @@ -163,7 +163,6 @@ typedef struct stp_cached_curve_t hue_map; stp_cached_curve_t lum_map; stp_cached_curve_t sat_map; - stp_cached_curve_t gcr_curve; unsigned short *gray_tmp; /* Color -> Gray */ unsigned short *cmy_tmp; /* CMY -> CMYK */ unsigned char *in_data; diff --git a/src/main/color-conversions.c b/src/main/color-conversions.c index 2b354c6..1959613 100644 --- a/src/main/color-conversions.c +++ b/src/main/color-conversions.c @@ -1,5 +1,5 @@ /* - * "$Id: color-conversions.c,v 1.18 2005/07/01 01:40:08 rlk Exp $" + * "$Id: color-conversions.c,v 1.20 2005/07/04 00:23:54 rlk Exp $" * * Gimp-Print color management module - traditional Gimp-Print algorithm. * @@ -366,107 +366,6 @@ short_copy(unsigned short *out, const unsigned short *in, size_t count) } static unsigned -generic_cmy_to_kcmy(const stp_vars_t *vars, const unsigned short *in, - unsigned short *out) -{ - lut_t *lut = (lut_t *)(stp_get_component_data(vars, "Color")); - int width = lut->image_width; - int step = 65535 / (lut->steps - 1); /* 1 or 257 */ - - const unsigned short *gcr_lookup; - const unsigned short *black_lookup; - int i; - int i0 = -1; - int i1 = -1; - int i2 = -1; - unsigned short o0 = 0; - unsigned short o1 = 0; - unsigned short o2 = 0; - unsigned short o3 = 0; - unsigned short nz0 = 0; - unsigned short nz1 = 0; - unsigned short nz2 = 0; - unsigned short nz3 = 0; - - stp_curve_resample(stp_curve_cache_get_curve(&(lut->gcr_curve)), lut->steps); - gcr_lookup = stp_curve_cache_get_ushort_data(&(lut->gcr_curve)); - stp_curve_resample(stp_curve_cache_get_curve - (&(lut->channel_curves[CHANNEL_K])), lut->steps); - black_lookup = - stp_curve_cache_get_ushort_data(&(lut->channel_curves[CHANNEL_K])); - - for (i = 0; i < width; i++, out += 4, in += 3) - { - if (i0 == in[0] && i1 == in[1] && i2 == in[2]) - { - out[0] = o0; - out[1] = o1; - out[2] = o2; - out[3] = o3; - } - else - { - int k; - i0 = in[0]; - i1 = in[1]; - i2 = in[2]; - k = FMIN(i0, FMIN(i1, i2)); - out[0] = 0; - out[1] = i0; - out[2] = i1; - out[3] = i2; - if (k > 0) - { - int where, resid; - int kk; - if (lut->steps == 65536) - kk = gcr_lookup[k]; - else - { - where = k / step; - resid = k % step; - kk = gcr_lookup[where]; - if (resid > 0) - kk += (gcr_lookup[where + 1] - gcr_lookup[where]) * resid / - step; - } - if (kk > k) - kk = k; - if (kk > 0) - { - if (lut->steps == 65536) - out[0] = black_lookup[kk]; - else - { - int k_out; - where = kk / step; - resid = kk % step; - k_out = black_lookup[where]; - if (resid > 0) - k_out += - (black_lookup[where + 1] - black_lookup[where]) * - resid / step; - out[0] = k_out; - } - out[1] -= kk; - out[2] -= kk; - out[3] -= kk; - } - } - o0 = out[0]; - o1 = out[1]; - o2 = out[2]; - o3 = out[3]; - nz0 |= o0; - nz1 |= o1; - nz2 |= o2; - nz3 |= o3; - } - } - return (nz0 ? 0 : 1) + (nz1 ? 0 : 2) + (nz2 ? 0 : 4) + (nz3 ? 0 : 8); -} - -static unsigned raw_cmy_to_kcmy(const stp_vars_t *vars, const unsigned short *in, unsigned short *out) { @@ -881,20 +780,20 @@ name##_##bits##_to_##name2(const stp_vars_t *vars, const unsigned char *in, \ return status; \ } -COLOR_TO_KCMY_FUNC(gray, kcmy, color, generic, 8) -COLOR_TO_KCMY_FUNC(gray, kcmy, color, generic, 16) +COLOR_TO_KCMY_FUNC(gray, kcmy, color, raw, 8) +COLOR_TO_KCMY_FUNC(gray, kcmy, color, raw, 16) GENERIC_COLOR_FUNC(gray, kcmy) COLOR_TO_KCMY_FUNC(gray, kcmy_raw, color_raw, raw, 8) COLOR_TO_KCMY_FUNC(gray, kcmy_raw, color_raw, raw, 16) GENERIC_COLOR_FUNC(gray, kcmy_raw) -COLOR_TO_KCMY_FUNC(color, kcmy, color, generic, 8) -COLOR_TO_KCMY_FUNC(color, kcmy, color, generic, 16) +COLOR_TO_KCMY_FUNC(color, kcmy, color, raw, 8) +COLOR_TO_KCMY_FUNC(color, kcmy, color, raw, 16) GENERIC_COLOR_FUNC(color, kcmy) -COLOR_TO_KCMY_FUNC(color, kcmy_fast, color_fast, generic, 8) -COLOR_TO_KCMY_FUNC(color, kcmy_fast, color_fast, generic, 16) +COLOR_TO_KCMY_FUNC(color, kcmy_fast, color_fast, raw, 8) +COLOR_TO_KCMY_FUNC(color, kcmy_fast, color_fast, raw, 16) GENERIC_COLOR_FUNC(color, kcmy_fast) COLOR_TO_KCMY_FUNC(color, kcmy_raw, color_raw, raw, 8) diff --git a/src/main/escp2-channels.c b/src/main/escp2-channels.c index 7d9a839..2946e06 100644 --- a/src/main/escp2-channels.c +++ b/src/main/escp2-channels.c @@ -1,5 +1,5 @@ /* - * "$Id: escp2-channels.c,v 1.54 2005/06/26 22:07:46 rlk Exp $" + * "$Id: escp2-channels.c,v 1.56 2005/07/03 22:13:36 rlk Exp $" * * Print plug-in EPSON ESC/P2 driver for the GIMP. * @@ -165,7 +165,7 @@ static hue_curve_t r800_red_curve = "<sequence count=\"48\" lower-bound=\"0\" upper-bound=\"4\">\n" /* C */ "0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 " /* B */ /* B */ "0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 " /* M */ - /* M */ "0.000 0.350 0.550 0.700 0.850 1.000 1.000 1.000 " /* R */ + /* M */ "0.025 0.400 0.600 0.750 0.890 1.000 1.000 1.000 " /* R */ /* R */ "1.000 0.875 0.750 0.625 0.500 0.375 0.250 0.125 " /* Y */ /* Y */ "0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 " /* G */ /* G */ "0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 " /* C */ @@ -181,9 +181,9 @@ static hue_curve_t r800_blue_curve = "<gutenprint>\n" "<curve wrap=\"wrap\" type=\"linear\" gamma=\"0\">\n" "<sequence count=\"48\" lower-bound=\"0\" upper-bound=\"4\">\n" - /* C */ "0.000 0.125 0.250 0.375 0.500 0.625 0.750 0.875 " /* B */ - /* B */ "1.000 1.000 1.000 1.000 0.900 0.800 0.500 0.200 " /* M */ - /* M */ "0.005 0.000 0.000 0.000 0.000 0.000 0.000 0.000 " /* R */ + /* C */ "0.000 0.250 0.475 0.700 0.810 0.875 0.940 1.000 " /* B */ + /* B */ "1.000 0.975 0.930 0.875 0.810 0.740 0.650 0.400 " /* M */ + /* M */ "0.040 0.002 0.000 0.000 0.000 0.000 0.000 0.000 " /* R */ /* R */ "0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 " /* Y */ /* Y */ "0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 " /* G */ /* G */ "0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 " /* C */ @@ -1725,8 +1725,8 @@ static const shade_set_t photo_gen2_shades = /* Stylus 870 and newer */ static const shade_set_t photo_gen3_shades = /* Stylus R300 and newer */ { { 1, { 1.0 }}, - { 2, { 1.0, 0.35 }}, - { 2, { 1.0, 0.35 }}, + { 2, { 1.0, 0.3 }}, + { 2, { 1.0, 0.3 }}, { 1, { 1.0 }}, { 1, { 1.0 }}, { 1, { 1.0 }}, diff --git a/src/main/escp2-papers.c b/src/main/escp2-papers.c index ce892b4..90d59e7 100644 --- a/src/main/escp2-papers.c +++ b/src/main/escp2-papers.c @@ -1,5 +1,5 @@ /* - * "$Id: escp2-papers.c,v 1.75 2005/07/01 01:40:09 rlk Exp $" + * "$Id: escp2-papers.c,v 1.77 2005/07/03 22:13:36 rlk Exp $" * * Print plug-in EPSON ESC/P2 driver for the GIMP. * @@ -156,8 +156,8 @@ static const char photo3_hue_adj[] = "<gutenprint>\n" "<curve wrap=\"wrap\" type=\"linear\" gamma=\"0\">\n" "<sequence count=\"48\" lower-bound=\"-6\" upper-bound=\"6\">\n" -/* C */ "0.00 0.00 0.00 -.02 -.04 -.08 -.12 -.16 " /* B */ -/* B */ "-.20 -.24 -.28 -.32 -.32 -.32 -.32 -.32 " /* M */ +/* C */ "0.00 -.01 -.03 -.06 -.10 -.15 -.20 -.25 " /* B */ +/* B */ "-.28 -.30 -.34 -.35 -.35 -.34 -.33 -.33 " /* M */ /* M */ "-.36 -.40 -.44 -.48 -.50 -.45 -.40 -.30 " /* R */ /* R */ "-.12 -.07 -.04 -.02 0.00 0.00 0.00 0.00 " /* Y */ /* Y */ "0.00 -.00 -.00 -.00 -.02 -.04 -.08 -.13 " /* G */ @@ -416,7 +416,7 @@ static const char r800_glossy_lum_adj[] = "<curve wrap=\"wrap\" type=\"linear\" gamma=\"0\">\n" "<sequence count=\"48\" lower-bound=\"0\" upper-bound=\"4\">\n" /* C */ "0.75 0.75 0.75 0.75 0.76 0.80 0.85 0.90 " /* B */ -/* B */ "0.90 0.88 0.82 0.78 0.78 0.82 0.85 0.92 " /* M */ +/* B */ "0.90 0.88 0.82 0.85 0.87 0.89 0.91 0.95 " /* M */ /* M */ "0.98 0.98 0.97 0.97 0.96 0.96 0.96 0.96 " /* R */ /* R */ "0.96 0.97 0.98 0.98 0.99 1.00 1.00 1.00 " /* Y */ /* Y */ "1.00 1.00 1.00 0.99 0.98 0.97 0.96 0.93 " /* G */ @@ -431,7 +431,7 @@ static const char r800_glossy_hue_adj[] = "<curve wrap=\"wrap\" type=\"linear\" gamma=\"0\">\n" "<sequence count=\"48\" lower-bound=\"-6\" upper-bound=\"6\">\n" /* C */ "0.00 -.07 -.10 -.15 -.19 -.25 -.30 -.35 " /* B */ -/* B */ "-.38 -.38 -.30 -.20 -.10 -.00 0.02 0.02 " /* M */ +/* B */ "-.38 -.38 -.30 -.20 -.10 -.00 0.00 0.00 " /* M */ /* M */ "-.00 -.00 -.00 -.00 -.00 -.00 -.00 0.00 " /* R */ /* R */ "0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 " /* Y */ /* Y */ "0.00 -.00 -.00 -.00 -.00 -.00 -.00 -.00 " /* G */ @@ -590,43 +590,43 @@ DECLARE_PAPER_ADJUSTMENTS(photo2); static const paper_adjustment_t photo3_adjustments[] = { - { "Plain", 0.738, .5, 0.75, .1, .9, 1, .525, .816, .75, 1, 1.0, + { "Plain", 0.738, .35, 0.75, .15, .9, 1, .59, .7, .9, 1, 1.0, photo3_hue_adj, photo3_lum_adj, photo3_sat_adj }, - { "PlainFast", 0.738, .5, 0.75, .1, .9, 1, .525, .816, .75, 1, 1.0, + { "PlainFast", 0.738, .35, 0.75, .15, .9, 1, .59, .7, .9, 1, 1.0, photo3_hue_adj, photo3_lum_adj, photo3_sat_adj }, - { "Postcard", 0.83, .5, 0.75, .1, .9, 1, .525, .816, .75, 1, 1.0, + { "Postcard", 0.83, .35, 0.5, .2, .9, 1, .59, .7, .9, 1, 1.0, photo3_hue_adj, photo3_lum_adj, photo3_sat_adj }, - { "GlossyFilm", 1.00, .5, 0.75, .2, .999, 1, .525, .816, .75, 1, 1, + { "GlossyFilm", 1.00, .35, 0.75, .2, .999, 1, .59, .7, .9, 1, 1, photo3_hue_adj, photo3_lum_adj, photo3_sat_adj }, - { "Transparency", 1.00, .5, 0.75, .2, .999, 1, .525, .816, .75, 1, 1, + { "Transparency", 1.00, .35, 0.75, .2, .999, 1, .59, .7, .9, 1, 1, photo3_hue_adj, photo3_lum_adj, photo3_sat_adj }, - { "Envelope", 0.738, .5, 0.75, .1, .9, 1, .525, .816, .75, 1, 1.0, + { "Envelope", 0.738, .35, 0.75, .15, .9, 1, .59, .7, .9, 1, 1.0, photo3_hue_adj, photo3_lum_adj, photo3_sat_adj }, - { "BackFilm", 1.00, .5, 0.75, .2, .999, 1, .525, .816, .75, 1, 1, + { "BackFilm", 1.00, .35, 0.75, .2, .999, 1, .59, .7, .9, 1, 1, photo3_hue_adj, photo3_lum_adj, photo3_sat_adj }, - { "Matte", 0.85, .75, 0.75, .3, .999, 1, .525, .816, .75, 1, 1, + { "Matte", 0.85, .35, 0.75, .3, .999, 1, .59, .7, .9, 1, 1, photo3_hue_adj, photo3_lum_adj, photo3_sat_adj }, - { "MatteHeavy", 0.85, .75, .3, .2, .999, 1, .525, .816, .75, 1, 1, + { "MatteHeavy", 0.85, .35, .3, .3, .999, 1, .59, .7, .9, 1, 1, photo3_hue_adj, photo3_lum_adj, photo3_sat_adj }, - { "Inkjet", 0.85, .5, 0.75, .15, .9, 1, .525, .816, .75, 1, 1, + { "Inkjet", 0.85, .35, 0.75, .2, .9, 1, .59, .7, .9, 1, 1, photo3_hue_adj, photo3_lum_adj, photo3_sat_adj }, - { "Coated", 1.2, .5, .75, .15, .999, 1, .525, .816, .75, 1, 1, + { "Coated", 1.2, .35, .5, .3, .999, 1, .59, .7, .9, 1, 1, photo3_hue_adj, photo3_lum_adj, photo3_sat_adj }, - { "Photo", 1.00, .5, 0.75, .2, .999, 1, .525, .816, .75, 1, 1, + { "Photo", 1.00, .35, 0.5, .3, .999, 1, .59, .7, .9, 1, 1, photo3_hue_adj, photo3_lum_adj, photo3_sat_adj }, - { "GlossyPhoto", 1.0, .25, 0.5, .3, .999, 1, .6, .82, .66, 1, 0.85, + { "GlossyPhoto", 1.0, .25, 0.5, .3, .999, 1, .6, .83, .66, 1, 0.85, photo3_hue_adj, photo3_lum_adj, photo3_sat_adj }, - { "Semigloss", 1.0, .25, 0.5, .3, .999, 1, .525, .816, .75, 1, 0.92, + { "Semigloss", 1.0, .25, 0.5, .3, .999, 1, .59, .7, .9, 1, 0.92, photo3_hue_adj, photo3_lum_adj, photo3_sat_adj }, - { "Luster", 1.0, .25, 0.5, .3, .999, 1, .525, .816, .75, 1, 0.92, + { "Luster", 1.0, .25, 0.5, .3, .999, 1, .59, .7, .9, 1, 0.92, photo3_hue_adj, photo3_lum_adj, photo3_sat_adj }, - { "GlossyPaper", 1.00, .5, 0.75, .2, .999, 1, .525, .816, .75, 1, 1, + { "GlossyPaper", 1.00, .35, 0.75, .2, .999, 1, .59, .7, .9, 1, 1, photo3_hue_adj, photo3_lum_adj, photo3_sat_adj }, - { "Ilford", .85, .5, 0.75, .2, .999, 1, .525, .816, .75, 1, 1, + { "Ilford", .85, .25, 0.75, .2, .999, 1, .59, .7, .9, 1, 1, photo3_hue_adj, photo3_lum_adj, photo3_sat_adj }, - { "ColorLife", 1.00, .5, 0.75, .2, .9, 1, .525, .816, .75, 1, 1, + { "ColorLife", 1.00, .35, 0.75, .2, .9, 1, .59, .7, .9, 1, 1, photo3_hue_adj, photo3_lum_adj, photo3_sat_adj }, - { "Other", 0.738, .5, 0.75, .1, .9, 1, .525, .816, .75, 1, 1, + { "Other", 0.738, .35, 0.5, .5, .9, 1, .59, .7, .9, 1, 1, photo3_hue_adj, photo3_lum_adj, photo3_sat_adj }, }; @@ -772,47 +772,47 @@ DECLARE_PAPER_ADJUSTMENTS(ultrachrome_matte); static const paper_adjustment_t r800_photo_adjustments[] = { - { "Plain", 0.72, .1, 1, .1, 0.5, .882, 1, .300, 1, 1, 1.0, + { "Plain", 0.72, .1, 1, .02, 0.3, .882, 1, .300, 1, 1, 1.0, r800_glossy_hue_adj, r800_glossy_lum_adj, r800_glossy_sat_adj }, - { "PlainFast", 0.72, .1, 1, .1, 0.5, .882, 1, .300, 1, 1, 1.0, + { "PlainFast", 0.72, .1, 1, .02, 0.3, .882, 1, .300, 1, 1, 1.0, r800_glossy_hue_adj, r800_glossy_lum_adj, r800_glossy_sat_adj }, - { "Postcard", 0.72, .1, 1, .1, 0.5, .882, 1, .300, 1, 1, 1.0, + { "Postcard", 0.72, .1, 1, .02, 0.3, .882, 1, .300, 1, 1, 1.0, r800_glossy_hue_adj, r800_glossy_lum_adj, r800_glossy_sat_adj }, - { "GlossyFilm", 0.83, 1.0, 1, .1, 0.5, .882, 1, .300, 1, 1, 1.0, + { "GlossyFilm", 0.83, 1.0, 1, .02, 0.3, .882, 1, .300, 1, 1, 1.0, r800_glossy_hue_adj, r800_glossy_lum_adj, r800_glossy_sat_adj }, - { "Transparency", 0.83, .75, 1, .1, 0.5, .882, 1, .300, 1, 1, 1.0, + { "Transparency", 0.83, .75, 1, .02, 0.3, .882, 1, .300, 1, 1, 1.0, r800_glossy_hue_adj, r800_glossy_lum_adj, r800_glossy_sat_adj }, - { "Envelope", 0.72, .1, 1, .1, 0.5, .882, 1, .300, 1, 1, 1.0, + { "Envelope", 0.72, .1, 1, .02, 0.3, .882, 1, .300, 1, 1, 1.0, r800_glossy_hue_adj, r800_glossy_lum_adj, r800_glossy_sat_adj }, - { "BackFilm", 0.83, .75, 1, .1, 0.5, .882, 1, .300, 1, 1, 1.0, + { "BackFilm", 0.83, .75, 1, .02, 0.3, .882, 1, .300, 1, 1, 1.0, r800_glossy_hue_adj, r800_glossy_lum_adj, r800_glossy_sat_adj }, - { "Glossy", 0.92, 0.4, 1, .1, 0.5, .882, 1, .300, 1, 1, 1.0, + { "Glossy", 0.92, 0.4, 1, .02, 0.3, .882, 1, .300, 1, 1, 1.0, r800_glossy_hue_adj, r800_glossy_lum_adj, r800_glossy_sat_adj }, - { "GlossyHeavy", 0.92, 0.4, 1, .1, 0.5, .882, 1, .300, 1, 1, 1.0, + { "GlossyHeavy", 0.92, 0.4, 1, .02, 0.3, .882, 1, .300, 1, 1, 1.0, r800_glossy_hue_adj, r800_glossy_lum_adj, r800_glossy_sat_adj }, - { "Inkjet", 0.72, .5, 1, .1, 0.5, .882, 1, .300, 1, 1, 1.0, + { "Inkjet", 0.72, .5, 1, .02, 0.3, .882, 1, .300, 1, 1, 1.0, r800_glossy_hue_adj, r800_glossy_lum_adj, r800_glossy_sat_adj }, - { "Coated", 0.83, .5, 1, .1, 0.5, .882, 1, .300, 1, 1, 1.0, + { "Coated", 0.83, .5, 1, .02, 0.3, .882, 1, .300, 1, 1, 1.0, r800_glossy_hue_adj, r800_glossy_lum_adj, r800_glossy_sat_adj }, - { "Photo", 1.0, .75, 1, .1, 0.5, .882, 1, .300, 1, 1, 1.0, + { "Photo", 1.0, .75, 1, .02, 0.3, .882, 1, .300, 1, 1, 1.0, r800_glossy_hue_adj, r800_glossy_lum_adj, r800_glossy_sat_adj }, - { "GlossyPhoto", 0.72, 1, 1, .1, 0.5, .882, 1, .300, 1, 1, 0.92, + { "GlossyPhoto", 0.72, 1, 1, .02, 0.3, .882, 1, .300, 1, 1, 0.92, r800_glossy_hue_adj, r800_glossy_lum_adj, r800_glossy_sat_adj }, - { "Semigloss", 0.72, .8, 1, .1, 0.5, .882, 1, .300, 1, 1, 0.92, + { "Semigloss", 0.72, .8, 1, .02, 0.3, .882, 1, .300, 1, 1, 0.92, r800_glossy_hue_adj, r800_glossy_lum_adj, r800_glossy_sat_adj }, - { "Luster", 0.72, .8, 1, .1, .5, .882, 1, .300, 1, 1, 0.92, + { "Luster", 0.72, .8, 1, .02, .3, .882, 1, .300, 1, 1, 0.92, r800_glossy_hue_adj, r800_glossy_lum_adj, r800_glossy_sat_adj }, - { "ArchivalGlossy", 0.92, .4, 1, .1, 0.5, .882, 1, .300, 1, 1, 1.0, + { "ArchivalGlossy", 0.92, .4, 1, .02, 0.3, .882, 1, .300, 1, 1, 1.0, r800_glossy_hue_adj, r800_glossy_lum_adj, r800_glossy_sat_adj }, - { "WaterColorRadiant", 0.92, .4, 1, .1, 0.5, .882, 1, .300, 1, 1, 1.0, + { "WaterColorRadiant", 0.92, .4, 1, .02, 0.3, .882, 1, .300, 1, 1, 1.0, r800_glossy_hue_adj, r800_glossy_lum_adj, r800_glossy_sat_adj }, - { "GlossyPaper", 0.83, 1.0, 1, .1, 0.5, .882, 1, .300, 1, 1, 1.0, + { "GlossyPaper", 0.83, 1.0, 1, .02, 0.3, .882, 1, .300, 1, 1, 1.0, r800_glossy_hue_adj, r800_glossy_lum_adj, r800_glossy_sat_adj }, - { "Ilford", 0.83, 1.0, 1, .1, 0.5, .882, 1, .300, 1, 1, 1.0, + { "Ilford", 0.83, 1.0, 1, .02, 0.3, .882, 1, .300, 1, 1, 1.0, r800_glossy_hue_adj, r800_glossy_lum_adj, r800_glossy_sat_adj }, - { "ColorLife", 0.83, 1.0, 1, .1, 0.5, .882, 1, .300, 1, 1, 1.0, + { "ColorLife", 0.83, 1.0, 1, .02, 0.3, .882, 1, .300, 1, 1, 1.0, r800_glossy_hue_adj, r800_glossy_lum_adj, r800_glossy_sat_adj }, - { "Other", 0.72, .1, 1, .1, 0.5, .882, 1, .300, 1, 1, 1.0, + { "Other", 0.72, .1, 1, .02, 0.3, .882, 1, .300, 1, 1, 1.0, r800_glossy_hue_adj, r800_glossy_lum_adj, r800_glossy_sat_adj }, }; diff --git a/src/main/print-canon.c b/src/main/print-canon.c index a07699c..f5a5496 100644 --- a/src/main/print-canon.c +++ b/src/main/print-canon.c @@ -1,5 +1,5 @@ /* - * "$Id: print-canon.c,v 1.155 2005/05/08 03:10:37 rlk Exp $" + * "$Id: print-canon.c,v 1.156 2005/07/03 22:13:36 rlk Exp $" * * Print plug-in CANON BJL driver for the GIMP. * @@ -1277,32 +1277,32 @@ static const float_param_t float_parameters[] = { { { - "CyanDensity", N_("Cyan Balance"), N_("Output Level Adjustment"), - N_("Adjust the cyan balance"), + "CyanDensity", N_("Cyan Density"), N_("Output Level Adjustment"), + N_("Adjust the cyan density"), STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT, STP_PARAMETER_LEVEL_ADVANCED, 0, 1, 1, 1, 0 }, 0.0, 2.0, 1.0, 1 }, { { - "MagentaDensity", N_("Magenta Balance"), N_("Output Level Adjustment"), - N_("Adjust the magenta balance"), + "MagentaDensity", N_("Magenta Density"), N_("Output Level Adjustment"), + N_("Adjust the magenta density"), STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT, STP_PARAMETER_LEVEL_ADVANCED, 0, 1, 2, 1, 0 }, 0.0, 2.0, 1.0, 1 }, { { - "YellowDensity", N_("Yellow Balance"), N_("Output Level Adjustment"), - N_("Adjust the yellow balance"), + "YellowDensity", N_("Yellow Density"), N_("Output Level Adjustment"), + N_("Adjust the yellow density"), STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT, STP_PARAMETER_LEVEL_ADVANCED, 0, 1, 3, 1, 0 }, 0.0, 2.0, 1.0, 1 }, { { - "BlackDensity", N_("Black Balance"), N_("Output Level Adjustment"), - N_("Adjust the black balance"), + "BlackDensity", N_("Black Density"), N_("Output Level Adjustment"), + N_("Adjust the black density"), STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT, STP_PARAMETER_LEVEL_ADVANCED, 0, 1, 0, 1, 0 }, 0.0, 2.0, 1.0, 1 diff --git a/src/main/print-color.c b/src/main/print-color.c index b381667..b6ebb71 100644 --- a/src/main/print-color.c +++ b/src/main/print-color.c @@ -1,5 +1,5 @@ /* - * "$Id: print-color.c,v 1.129 2005/06/30 01:45:19 rlk Exp $" + * "$Id: print-color.c,v 1.131 2005/07/04 00:23:54 rlk Exp $" * * Gutenprint color management module - traditional Gutenprint algorithm. * @@ -282,7 +282,7 @@ static const float_param_t float_parameters[] = N_("Adjust the red gamma"), STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT, STP_PARAMETER_LEVEL_ADVANCED1, 0, 1, 1, 1, 0 - }, 0.0, 4.0, 1.0, CMASK_R, 1 + }, 0.0, 1.0, 1.0, CMASK_R, 1 }, { { @@ -310,6 +310,30 @@ static const float_param_t float_parameters[] = }, { { + "CyanBalance", N_("Cyan Balance"), N_("GrayBalance"), + N_("Adjust the cyan gray balance"), + STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT, + STP_PARAMETER_LEVEL_ADVANCED1, 0, 1, 1, 1, 0 + }, 0.0, 1.0, 1.0, CMASK_C, 1 + }, + { + { + "MagentaBalance", N_("Magenta Balance"), N_("GrayBalance"), + N_("Adjust the magenta gray balance"), + STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT, + STP_PARAMETER_LEVEL_ADVANCED1, 0, 1, 2, 1, 0 + }, 0.0, 1.0, 1.0, CMASK_M, 1 + }, + { + { + "YellowBalance", N_("Yellow Balance"), N_("GrayBalance"), + N_("Adjust the yellow gray balance"), + STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT, + STP_PARAMETER_LEVEL_ADVANCED1, 0, 1, 3, 1, 0 + }, 0.0, 1.0, 1.0, CMASK_Y, 1 + }, + { + { "Saturation", N_("Saturation"), N_("Basic Image Adjustment"), N_("Adjust the saturation (color balance) of the print\n" "Use zero saturation to produce grayscale output " @@ -701,7 +725,6 @@ copy_lut(void *vlut) stp_curve_cache_copy(&(dest->hue_map), &(src->hue_map)); stp_curve_cache_copy(&(dest->lum_map), &(src->lum_map)); stp_curve_cache_copy(&(dest->sat_map), &(src->sat_map)); - stp_curve_cache_copy(&(dest->gcr_curve), &(src->gcr_curve)); /* Don't copy gray_tmp */ /* Don't copy cmy_tmp */ if (src->in_data) @@ -723,7 +746,6 @@ free_lut(void *vlut) stp_curve_free_curve_cache(&(lut->hue_map)); stp_curve_free_curve_cache(&(lut->lum_map)); stp_curve_free_curve_cache(&(lut->sat_map)); - stp_curve_free_curve_cache(&(lut->gcr_curve)); STP_SAFE_FREE(lut->gray_tmp); STP_SAFE_FREE(lut->cmy_tmp); STP_SAFE_FREE(lut->in_data); @@ -799,29 +821,28 @@ static void initialize_gcr_curve(const stp_vars_t *vars) { lut_t *lut = (lut_t *)(stp_get_component_data(vars, "Color")); - if (!stp_curve_cache_get_curve(&(lut->gcr_curve))) + stp_curve_t *curve = NULL; + if (stp_check_curve_parameter(vars, "GCRCurve", STP_PARAMETER_DEFAULTED)) { - if (stp_check_curve_parameter(vars, "GCRCurve", STP_PARAMETER_DEFAULTED)) + double data; + size_t count; + int i; + curve = stp_curve_create_copy(stp_get_curve_parameter(vars, "GCRCurve")); + stp_curve_resample(curve, lut->steps); + count = stp_curve_count_points(curve); + stp_curve_set_bounds(curve, 0.0, 65535.0); + for (i = 0; i < count; i++) { - double data; - size_t count; - int i; - stp_curve_t *curve = - stp_curve_create_copy(stp_get_curve_parameter(vars, "GCRCurve")); - stp_curve_resample(curve, lut->steps); - count = stp_curve_count_points(curve); - stp_curve_set_bounds(curve, 0.0, 65535.0); - for (i = 0; i < count; i++) - { - stp_curve_get_point(curve, i, &data); - data = 65535.0 * data * (double) i / (count - 1); - stp_curve_set_point(curve, i, data); - } - stp_curve_cache_set_curve(&(lut->gcr_curve), curve); + stp_curve_get_point(curve, i, &data); + data = 65535.0 * data * (double) i / (count - 1); + stp_curve_set_point(curve, i, data); } - else - stp_curve_cache_set_curve(&(lut->gcr_curve), compute_gcr_curve(vars)); } + else + curve = compute_gcr_curve(vars); + stp_channel_set_gcr_curve((stp_vars_t *)vars, curve); + if (curve) + stp_curve_destroy(curve); } /* diff --git a/src/main/print-escp2.c b/src/main/print-escp2.c index 03f0cce..041bdf4 100644 --- a/src/main/print-escp2.c +++ b/src/main/print-escp2.c @@ -1,5 +1,5 @@ /* - * "$Id: print-escp2.c,v 1.340 2005/06/30 00:12:14 rlk Exp $" + * "$Id: print-escp2.c,v 1.341 2005/07/03 22:13:37 rlk Exp $" * * Print plug-in EPSON ESC/P2 driver for the GIMP. * @@ -409,48 +409,48 @@ static const float_param_t float_parameters[] = { { { - "CyanDensity", N_("Cyan Balance"), N_("Output Level Adjustment"), - N_("Adjust the cyan balance"), + "CyanDensity", N_("Cyan Density"), N_("Output Level Adjustment"), + N_("Adjust the cyan density"), STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT, STP_PARAMETER_LEVEL_ADVANCED, 0, 1, 1, 1, 0 }, 0.0, 2.0, 1.0, 1 }, { { - "MagentaDensity", N_("Magenta Balance"), N_("Output Level Adjustment"), - N_("Adjust the magenta balance"), + "MagentaDensity", N_("Magenta Density"), N_("Output Level Adjustment"), + N_("Adjust the magenta density"), STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT, STP_PARAMETER_LEVEL_ADVANCED, 0, 1, 2, 1, 0 }, 0.0, 2.0, 1.0, 1 }, { { - "YellowDensity", N_("Yellow Balance"), N_("Output Level Adjustment"), - N_("Adjust the yellow balance"), + "YellowDensity", N_("Yellow Density"), N_("Output Level Adjustment"), + N_("Adjust the yellow density"), STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT, STP_PARAMETER_LEVEL_ADVANCED, 0, 1, 3, 1, 0 }, 0.0, 2.0, 1.0, 1 }, { { - "BlackDensity", N_("Black Balance"), N_("Output Level Adjustment"), - N_("Adjust the black balance"), + "BlackDensity", N_("Black Density"), N_("Output Level Adjustment"), + N_("Adjust the black density"), STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT, STP_PARAMETER_LEVEL_ADVANCED, 0, 1, 0, 1, 0 }, 0.0, 2.0, 1.0, 1 }, { { - "RedDensity", N_("Red Balance"), N_("Output Level Adjustment"), - N_("Adjust the red balance"), + "RedDensity", N_("Red Density"), N_("Output Level Adjustment"), + N_("Adjust the red density"), STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT, STP_PARAMETER_LEVEL_ADVANCED, 0, 1, 4, 1, 0 }, 0.0, 2.0, 1.0, 1 }, { { - "BlueDensity", N_("Blue Balance"), N_("Output Level Adjustment"), - N_("Adjust the blue balance"), + "BlueDensity", N_("Blue Density"), N_("Output Level Adjustment"), + N_("Adjust the blue density"), STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT, STP_PARAMETER_LEVEL_ADVANCED, 0, 1, 5, 1, 0 }, 0.0, 2.0, 1.0, 1 @@ -1423,12 +1423,11 @@ escp2_parameters(const stp_vars_t *v, const char *name, strcmp(name, "CDYAdjustment") == 0) { const input_slot_t *slot = get_input_slot(v); + description->bounds.dimension.lower = -15; + description->bounds.dimension.upper = 15; + description->deflt.dimension = 0; if (printer_supports_print_to_cd(v) && (!slot || (slot && slot->is_cd))) - { - description->bounds.dimension.lower = -15; - description->bounds.dimension.upper = 15; - description->deflt.dimension = 0; - } + description->is_active = 1; else description->is_active = 0; } @@ -2118,12 +2117,12 @@ adjust_print_quality(stp_vars_t *v, stp_image_t *image) k_lower = pt->k_lower; k_upper = pt->k_upper; k_transition = pt->k_transition; - stp_set_default_float_parameter(v, "CyanDensity", 1.0); - stp_scale_float_parameter(v, "CyanDensity", pt->cyan); - stp_set_default_float_parameter(v, "MagentaDensity", 1.0); - stp_scale_float_parameter(v, "MagentaDensity", pt->magenta); - stp_set_default_float_parameter(v, "YellowDensity", 1.0); - stp_scale_float_parameter(v, "YellowDensity", pt->yellow); + if (!stp_check_float_parameter(v, "CyanBalance", STP_PARAMETER_ACTIVE)) + stp_set_float_parameter(v, "CyanBalance", pt->cyan); + if (!stp_check_float_parameter(v, "MagentaBalance", STP_PARAMETER_ACTIVE)) + stp_set_float_parameter(v, "MagentaBalance", pt->magenta); + if (!stp_check_float_parameter(v, "YellowBalance", STP_PARAMETER_ACTIVE)) + stp_set_float_parameter(v, "YellowBalance", pt->yellow); stp_set_default_float_parameter(v, "BlackDensity", 1.0); stp_scale_float_parameter(v, "BlackDensity", pt->black); stp_set_default_float_parameter(v, "Saturation", 1.0); @@ -2132,7 +2131,6 @@ adjust_print_quality(stp_vars_t *v, stp_image_t *image) stp_scale_float_parameter(v, "Gamma", pt->gamma); } - if (!stp_check_float_parameter(v, "GCRLower", STP_PARAMETER_ACTIVE)) stp_set_default_float_parameter(v, "GCRLower", k_lower); if (!stp_check_float_parameter(v, "GCRUpper", STP_PARAMETER_ACTIVE)) @@ -2285,10 +2283,12 @@ setup_inks(stp_vars_t *v) { stp_curve_t *curve_tmp = stp_curve_create_copy(channel->hue_curve->curve_impl); +#if 0 (void) stp_curve_rescale(curve_tmp, sqrt(1.0 / stp_get_float_parameter(v, "Gamma")), STP_CURVE_COMPOSE_EXPONENTIATE, STP_CURVE_BOUNDS_RESCALE); +#endif stp_channel_set_curve(v, i, curve_tmp); stp_curve_destroy(curve_tmp); } diff --git a/src/main/print-lexmark.c b/src/main/print-lexmark.c index 64d4075..b57233c 100644 --- a/src/main/print-lexmark.c +++ b/src/main/print-lexmark.c @@ -1,6 +1,6 @@ /* - * "$Id: print-lexmark.c,v 1.149 2005/05/08 03:10:38 rlk Exp $" + * "$Id: print-lexmark.c,v 1.150 2005/07/03 22:13:39 rlk Exp $" * * Print plug-in Lexmark driver for the GIMP. * @@ -322,32 +322,32 @@ static const float_param_t float_parameters[] = { { { - "CyanDensity", N_("Cyan Balance"), N_("Output Level Adjustment"), - N_("Adjust the cyan balance"), + "CyanDensity", N_("Cyan Density"), N_("Output Level Adjustment"), + N_("Adjust the cyan density"), STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT, STP_PARAMETER_LEVEL_ADVANCED, 0, 1, 1, 1, 0 }, 0.0, 2.0, 1.0, 1 }, { { - "MagentaDensity", N_("Magenta Balance"), N_("Output Level Adjustment"), - N_("Adjust the magenta balance"), + "MagentaDensity", N_("Magenta Density"), N_("Output Level Adjustment"), + N_("Adjust the magenta density"), STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT, STP_PARAMETER_LEVEL_ADVANCED, 0, 1, 2, 1, 0 }, 0.0, 2.0, 1.0, 1 }, { { - "YellowDensity", N_("Yellow Balance"), N_("Output Level Adjustment"), - N_("Adjust the yellow balance"), + "YellowDensity", N_("Yellow Density"), N_("Output Level Adjustment"), + N_("Adjust the yellow density"), STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT, STP_PARAMETER_LEVEL_ADVANCED, 0, 1, 3, 1, 0 }, 0.0, 2.0, 1.0, 1 }, { { - "BlackDensity", N_("Black Balance"), N_("Output Level Adjustment"), - N_("Adjust the black balance"), + "BlackDensity", N_("Black Density"), N_("Output Level Adjustment"), + N_("Adjust the black density"), STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT, STP_PARAMETER_LEVEL_ADVANCED, 0, 1, 0, 1, 0 }, 0.0, 2.0, 1.0, 1 diff --git a/src/main/print-pcl.c b/src/main/print-pcl.c index 4f558b8..e02b2bd 100644 --- a/src/main/print-pcl.c +++ b/src/main/print-pcl.c @@ -1,5 +1,5 @@ /* - * "$Id: print-pcl.c,v 1.138 2005/05/08 03:10:39 rlk Exp $" + * "$Id: print-pcl.c,v 1.139 2005/07/03 22:13:39 rlk Exp $" * * Print plug-in HP PCL driver for the GIMP. * @@ -1215,32 +1215,32 @@ static const float_param_t float_parameters[] = { { { - "CyanDensity", N_("Cyan Balance"), N_("Output Level Adjustment"), - N_("Adjust the cyan balance"), + "CyanDensity", N_("Cyan Density"), N_("Output Level Adjustment"), + N_("Adjust the cyan density"), STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT, STP_PARAMETER_LEVEL_ADVANCED, 0, 1, 1, 1, 0 }, 0.0, 2.0, 1.0, 1 }, { { - "MagentaDensity", N_("Magenta Balance"), N_("Output Level Adjustment"), - N_("Adjust the magenta balance"), + "MagentaDensity", N_("Magenta Density"), N_("Output Level Adjustment"), + N_("Adjust the magenta density"), STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT, STP_PARAMETER_LEVEL_ADVANCED, 0, 1, 2, 1, 0 }, 0.0, 2.0, 1.0, 1 }, { { - "YellowDensity", N_("Yellow Balance"), N_("Output Level Adjustment"), - N_("Adjust the yellow balance"), + "YellowDensity", N_("Yellow Density"), N_("Output Level Adjustment"), + N_("Adjust the yellow density"), STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT, STP_PARAMETER_LEVEL_ADVANCED, 0, 1, 3, 1, 0 }, 0.0, 2.0, 1.0, 1 }, { { - "BlackDensity", N_("Black Balance"), N_("Output Level Adjustment"), - N_("Adjust the black balance"), + "BlackDensity", N_("Black Density"), N_("Output Level Adjustment"), + N_("Adjust the black density"), STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT, STP_PARAMETER_LEVEL_ADVANCED, 0, 1, 0, 1, 0 }, 0.0, 2.0, 1.0, 1 |