diff -ur gutenprint-5.0.0~rc2/src/main/print-lexmark.c gutenprint-5.0.0-rc3/src/main/print-lexmark.c --- gutenprint-5.0.0~rc2/src/main/print-lexmark.c 2005-07-04 00:13:39.000000000 +0200 +++ gutenprint-5.0.0-rc3/src/main/print-lexmark.c 2006-05-12 02:56:09.000000000 +0200 @@ -1152,7 +1147,7 @@ ink_parameter = lexmark_get_ink_parameter(ink_type, printing_color, caps, v); - if (ink_parameter->used_colors == COLOR_MODE_K || + if (!ink_parameter || ink_parameter->used_colors == COLOR_MODE_K || caps->inks == LEXMARK_INK_K || !printing_color) return "Grayscale"; else if (!(ink_parameter->used_colors & COLOR_MODE_K)) @@ -1279,8 +1274,9 @@ else if (strcmp(name, "PrintingMode") == 0) { description->bounds.str = stp_string_list_create(); + if (caps->inks != LEXMARK_INK_K) + stp_string_list_add_string + (description->bounds.str, "Color", _("Color")); - stp_string_list_add_string - (description->bounds.str, "Color", _("Color")); stp_string_list_add_string (description->bounds.str, "BW", _("Black and White")); description->deflt.str = @@ -2003,6 +1971,23 @@ /* if (use_glossy_film) */ + if (cols.p.k) + { + stp_dither_add_channel(v, cols.p.k, STP_ECOLOR_K, 0); + stp_channel_set_black_channel(v, STP_ECOLOR_K); + } + if (cols.p.c) + stp_dither_add_channel(v, cols.p.c, STP_ECOLOR_C, 0); + if (cols.p.C) + stp_dither_add_channel(v, cols.p.C, STP_ECOLOR_C, 1); + if (cols.p.m) + stp_dither_add_channel(v, cols.p.m, STP_ECOLOR_M, 0); + if (cols.p.M) + stp_dither_add_channel(v, cols.p.M, STP_ECOLOR_M, 1); + if (cols.p.y) + stp_dither_add_channel(v, cols.p.y, STP_ECOLOR_Y, 0); + if (cols.p.Y) + stp_dither_add_channel(v, cols.p.Y, STP_ECOLOR_Y, 1); if (!use_dmt) { if (cols.p.C) @@ -2103,29 +2086,13 @@ errlast = -1; errline = 0; - if (cols.p.k) - { - stp_dither_add_channel(v, cols.p.k, STP_ECOLOR_K, 0); - stp_channel_set_black_channel(v, STP_ECOLOR_K); - } - if (cols.p.c) - stp_dither_add_channel(v, cols.p.c, STP_ECOLOR_C, 0); - if (cols.p.C) - stp_dither_add_channel(v, cols.p.C, STP_ECOLOR_C, 1); - if (cols.p.m) - stp_dither_add_channel(v, cols.p.m, STP_ECOLOR_M, 0); - if (cols.p.M) - stp_dither_add_channel(v, cols.p.M, STP_ECOLOR_M, 1); - if (cols.p.y) - stp_dither_add_channel(v, cols.p.y, STP_ECOLOR_Y, 0); - if (cols.p.Y) - stp_dither_add_channel(v, cols.p.Y, STP_ECOLOR_Y, 1); privdata.hoffset = left; privdata.ydpi = ydpi; privdata.model = model; privdata.width = out_width; privdata.xdpi = xdpi; privdata.physical_xdpi = physical_xdpi; + privdata.bitwidth = 1; for (y = 0; y < out_height; y ++) { @@ -2193,6 +2160,7 @@ lexmark_parameters, stp_default_media_size, lexmark_imageable_area, + lexmark_imageable_area, lexmark_limit, lexmark_print, lexmark_describe_resolution, @@ -2779,7 +2714,10 @@ } /* calculate paper shift and adapt actual resoution to physical positioning resolution */ paperShift = (pass->logicalpassstart - pd->last_pass_offset) * (caps->y_raster_res/ydpi); - + for (j = 0; j < pd->ncolors; j++) + stp_dprintf(STP_DBG_LEXMARK, v, "Color %d: active %d line %p jets %d offset %ld\n", + j, lineactive[0].v[j], bufs[0].v[j], linecount[0].v[j], + lineoffs[0].v[j]); /*** do we have to print something with the color cartridge ? ***/ if ((STP_ECOLOR_C < pd->ncolors) && (lineactive[0].v[STP_ECOLOR_C] > 0)) @@ -2950,7 +2884,6 @@ } /* store paper position in respect if there was a paper shift */ pd->last_pass_offset = pass->logicalpassstart - (paperShift / (caps->y_raster_res/ydpi)); - } for (j = 0; j < pd->ncolors; j++) {