I'm having to release a Print 3.0.6 due to a fairly serious bug found
by Panos Katsaloulis. The specific bug is that monochrome printing in
grayscale does not work properly. The patch is enclosed below.
cvs diff: Diffing .
Index: README
===================================================================
RCS file: /src/repository/rlk/print/README,v
retrieving revision 1.6.2.2
retrieving revision 1.6.2.3
diff -u -r1.6.2.2 -r1.6.2.3
--- README 2000/01/13 23:41:34 1.6.2.2
+++ README 2000/02/11 23:44:39 1.6.2.3
@@ -1,4 +1,4 @@
-Print plugin for the Gimp. Version 3.0.5 by Robert Krawitz
+Print plugin for the Gimp. Version 3.0.6 by Robert Krawitz
<[EMAIL PROTECTED]> based on version 2.0 by Michael Sweet
<[EMAIL PROTECTED]>.
Index: print-escp2.c
===================================================================
RCS file: /src/repository/rlk/print/print-escp2.c,v
retrieving revision 1.39.2.1
retrieving revision 1.39.2.2
diff -u -r1.39.2.1 -r1.39.2.2
--- print-escp2.c 2000/01/13 03:32:34 1.39.2.1
+++ print-escp2.c 2000/02/11 23:44:39 1.39.2.2
@@ -1,5 +1,5 @@
/*
- * "$Id: print-escp2.c,v 1.39.2.1 2000/01/13 03:32:34 rlk Exp $"
+ * "$Id: print-escp2.c,v 1.39.2.2 2000/02/11 23:44:39 rlk Exp $"
*
* Print plug-in EPSON ESC/P2 driver for the GIMP.
*
@@ -31,6 +31,15 @@
* Revision History:
*
* $Log: print-escp2.c,v $
+ * Revision 1.39.2.2 2000/02/11 23:44:39 rlk
+ * 3.0.6
+ *
+ * Revision 1.13 2000/01/26 16:00:47 neo
+ * updated print plug-in
+ *
+ *
+ * --Sven
+ *
* Revision 1.39.2.1 2000/01/13 03:32:34 rlk
* silliness
*
@@ -1040,7 +1049,11 @@
if (output_type == OUTPUT_GRAY)
{
dither_black(out, x, image_height, out_width, black);
- escp2_write(prn, black, length, 0, 0, ydpi, model, out_width, left);
+ if (use_softweave)
+ escp2_write_weave(prn, length, ydpi, model, out_width, left, xdpi,
+ cyan, magenta, yellow, black, lcyan, lmagenta);
+ else
+ escp2_write(prn, black, length, 0, 0, ydpi, model, out_width, left);
}
else if (escp2_has_cap(model, MODEL_6COLOR_MASK, MODEL_6COLOR_YES))
{
@@ -1128,7 +1141,11 @@
if (output_type == OUTPUT_GRAY)
{
dither_black(out, y, image_width, out_width, black);
- escp2_write(prn, black, length, 0, 0, ydpi, model, out_width, left);
+ if (use_softweave)
+ escp2_write_weave(prn, length, ydpi, model, out_width, left, xdpi,
+ cyan, magenta, yellow, black, lcyan, lmagenta);
+ else
+ escp2_write(prn, black, length, 0, 0, ydpi, model, out_width, left);
}
else if (escp2_has_cap(model, MODEL_6COLOR_MASK, MODEL_6COLOR_YES))
{
@@ -1564,6 +1581,7 @@
/* quality) */
static int vmod; /* Number of banks of passes */
static int oversample; /* Excess precision per row */
+static int is_monochrome = 0;
/*
* Mapping between color and linear index. The colors are
@@ -1867,7 +1885,7 @@
{
for (j = 0; j < 6; j++)
{
- if (lineoffs[k].v[j] == 0)
+ if (lineoffs[k].v[j] == 0 || (j > 0 && is_monochrome))
continue;
if (escp2_has_cap(model, MODEL_6COLOR_MASK, MODEL_6COLOR_YES))
fprintf(prn, "\033(r\002%c%c%c", 0, densities[j], colors[j]);
@@ -2145,6 +2163,10 @@
cols[3] = y;
cols[4] = M;
cols[5] = C;
+ if (!c)
+ is_monochrome = 1;
+ else
+ is_monochrome = 0;
initialize_row(lineno, width);
@@ -2201,5 +2223,5 @@
}
/*
- * End of "$Id: print-escp2.c,v 1.39.2.1 2000/01/13 03:32:34 rlk Exp $".
+ * End of "$Id: print-escp2.c,v 1.39.2.2 2000/02/11 23:44:39 rlk Exp $".
*/
Index: print-pcl.c
===================================================================
RCS file: /src/repository/rlk/print/print-pcl.c,v
retrieving revision 1.14
retrieving revision 1.14.2.1
diff -u -r1.14 -r1.14.2.1
--- print-pcl.c 2000/01/08 23:30:56 1.14
+++ print-pcl.c 2000/01/15 14:33:02 1.14.2.1
@@ -1,5 +1,5 @@
/*
- * "$Id: print-pcl.c,v 1.14 2000/01/08 23:30:56 rlk Exp $"
+ * "$Id: print-pcl.c,v 1.14.2.1 2000/01/15 14:33:02 rlk Exp $"
*
* Print plug-in HP PCL driver for the GIMP.
*
@@ -32,6 +32,9 @@
* Revision History:
*
* $Log: print-pcl.c,v $
+ * Revision 1.14.2.1 2000/01/15 14:33:02 rlk
+ * PCL and Gimp 1.0 patches from Dave Hill
+ *
* Revision 1.14 2000/01/08 23:30:56 rlk
* Y2K copyright
*
@@ -426,6 +429,7 @@
char *resolution = v->resolution;
char *media_size = v->media_size;
char *media_type = v->media_type;
+ char *media_source = v->media_source;
int output_type = v->output_type;
int orientation = v->orientation;
float scaling = v->scaling;
@@ -687,15 +691,15 @@
else if (strcmp(media_type, "Transparency") == 0)
fputs("\033&l4M", prn);
- if (strcmp(media_type, "Manual") == 0) /* Set media source */
+ if (strcmp(media_source, "Manual") == 0) /* Set media source */
fputs("\033&l2H", prn);
- else if (strcmp(media_type, "Tray 1") == 0)
+ else if (strcmp(media_source, "Tray 1") == 0)
fputs("\033&l8H", prn);
- else if (strcmp(media_type, "Tray 2") == 0)
+ else if (strcmp(media_source, "Tray 2") == 0)
fputs("\033&l1H", prn);
- else if (strcmp(media_type, "Tray 3") == 0)
+ else if (strcmp(media_source, "Tray 3") == 0)
fputs("\033&l4H", prn);
- else if (strcmp(media_type, "Tray 4") == 0)
+ else if (strcmp(media_source, "Tray 4") == 0)
fputs("\033&l5H", prn);
if (model >= 500 && model < 1200 && xdpi >= 300)
@@ -1189,5 +1193,5 @@
/*
- * End of "$Id: print-pcl.c,v 1.14 2000/01/08 23:30:56 rlk Exp $".
+ * End of "$Id: print-pcl.c,v 1.14.2.1 2000/01/15 14:33:02 rlk Exp $".
*/
Index: print.c
===================================================================
RCS file: /src/repository/rlk/print/print.c,v
retrieving revision 1.38.2.2
retrieving revision 1.38.2.4
diff -u -r1.38.2.2 -r1.38.2.4
--- print.c 2000/01/13 23:40:41 1.38.2.2
+++ print.c 2000/02/11 23:44:39 1.38.2.4
@@ -1,5 +1,5 @@
/*
- * "$Id: print.c,v 1.38.2.2 2000/01/13 23:40:41 rlk Exp $"
+ * "$Id: print.c,v 1.38.2.4 2000/02/11 23:44:39 rlk Exp $"
*
* Print plug-in for the GIMP.
*
@@ -49,7 +49,7 @@
*/
#include <gtk/gtk.h>
#include <libgimp/gimp.h>
-#define PLUG_IN_VERSION "3.0.5 - 13 Jan 2000"
+#define PLUG_IN_VERSION "3.0.6 - 11 Feb 2000"
#define PLUG_IN_NAME "Print"
#include <math.h>