though
Jakub Bogusz <qboosh@pld-linux.org>
---- ghostscript-9.19/contrib/gdevcd8.c.orig 2016-03-23 09:22:48.000000000 +0100
-+++ ghostscript-9.19/contrib/gdevcd8.c 2016-07-26 21:15:42.417583552 +0200
+--- ghostscript-9.52/contrib/gdevcd8.c.orig 2020-03-19 09:21:42.000000000 +0100
++++ ghostscript-9.52/contrib/gdevcd8.c 2020-03-25 20:10:39.745178961 +0100
@@ -604,6 +604,7 @@
StartRasterMode start_raster_mode; /* output function to start raster mode */
PrintNonBlankLines print_non_blank_lines; /* output function to print a non blank line */
}
#define cmyk_colour_procs(proc_colour_open, proc_get_params, proc_put_params, \
-@@ -1056,6 +1057,7 @@
+@@ -1057,6 +1058,7 @@
if (code < 0 ||
(code = param_write_int(plist, "Quality", &cdj850->quality)) < 0 ||
(code = param_write_int(plist, "Papertype", &cdj850->papertype)) < 0 ||
(code = param_write_float(plist, "MasterGamma", &cdj850->gammavalc))
< 0 ||
(code = param_write_float(plist, "GammaValC", &cdj850->gammavalc)) <
-@@ -1079,6 +1081,7 @@
+@@ -1080,6 +1082,7 @@
{
int quality = cdj850->quality;
int papertype = cdj850->papertype;
float mastergamma = cdj850->mastergamma;
float gammavalc = cdj850->gammavalc;
float gammavalm = cdj850->gammavalm;
-@@ -1091,6 +1094,7 @@
+@@ -1092,6 +1095,7 @@
code = cdj_put_param_int(plist, "BitsPerPixel", &bpp, 1, 32, code);
code = cdj_put_param_int(plist, "Quality", &quality, 0, 2, code);
code = cdj_put_param_int(plist, "Papertype", &papertype, 0, 4, code);
+ code = cdj_put_param_int(plist, "UseBlack", &useblack, 0, 1, code);
- code = cdj_put_param_float(plist, "MasterGamma", &mastergamma, 0.1, 9.0, code);
- code = cdj_put_param_float(plist, "GammaValC", &gammavalc, 0.0, 9.0, code);
- code = cdj_put_param_float(plist, "GammaValM", &gammavalm, 0.0, 9.0, code);
-@@ -1107,6 +1111,7 @@
+ code = cdj_put_param_float(plist, "MasterGamma", &mastergamma, 0.1f, 9.0f, code);
+ code = cdj_put_param_float(plist, "GammaValC", &gammavalc, 0.0f, 9.0f, code);
+ code = cdj_put_param_float(plist, "GammaValM", &gammavalm, 0.0f, 9.0f, code);
+@@ -1108,6 +1112,7 @@
cdj850->quality = quality;
cdj850->papertype = papertype;
cdj850->mastergamma = mastergamma;
cdj850->gammavalc = gammavalc;
cdj850->gammavalm = gammavalm;
-@@ -1159,7 +1164,13 @@
+@@ -1160,7 +1165,13 @@
gx_device_printer * pdev,
struct error_val_field *error_values);
static int
const byte * cvalues, const byte * mvalues,
const byte * yvalues, const int *kcorrect,
word * inword);
-@@ -2035,7 +2035,10 @@ send_scan_lines(gx_device_printer * pdev
+@@ -2025,7 +2036,10 @@
}
/* Skip blank lines if any */
if (num_blank_lines > 0) {
memset(data_ptrs->plane_data[0][0], 0,
(misc_vars->plane_size * 2 * misc_vars->num_comps));
memset(data_ptrs->plane_data_c[0][0], 0,
-@@ -2045,7 +2048,10 @@ send_scan_lines(gx_device_printer * pdev
+@@ -2035,7 +2049,10 @@
/* all blank lines printed, now for the non-blank lines */
if (cdj850->yscal && odd(lnum)) {
/* output a blank black plane for odd lines */
}
/* now output all non blank lines */
while (lnum < lend && llen != 0) {
-@@ -2077,9 +2077,11 @@ print_c9plane(gp_file * prn_stream, char
+@@ -2061,9 +2078,11 @@
int out_count = gdev_pcl_mode9compress(plane_size, curr, prev, out_data);
/* and output the data */
}
}
-@@ -2121,15 +2140,22 @@
+@@ -2122,15 +2141,22 @@
byte *dp = data_ptrs->data[misc_vars->scan + 2];
int *ep = data_ptrs->errors[misc_vars->scan];
/* dithering the black-plane */
FSDlinebw(misc_vars->scan, misc_vars->plane_size,
-@@ -2199,15 +2225,22 @@
+@@ -2200,15 +2226,22 @@
byte *dp = data_ptrs->data[misc_vars->scan + 2];
int *ep = data_ptrs->errors[misc_vars->scan];
/* dithering the black-plane */
FSDlinebw(misc_vars->scan, misc_vars->plane_size,
-@@ -2410,7 +2443,7 @@
+@@ -2411,7 +2444,7 @@
do real color separation, here we try a real grey component
replacement */
static int
const byte cvalues[256], const byte mvalues[256],
const byte yvalues[256], const int kcorrect[256],
word * inword)
-@@ -2420,7 +2453,7 @@
+@@ -2421,7 +2454,7 @@
word last_color_value = 0;
word *last_color;
last_color = &last_color_value;
/* Grey component replacement */
for (i = 0; i < bytecount; i += 4) {
-@@ -2450,11 +2483,12 @@
+@@ -2451,11 +2484,12 @@
/* Test whether we 've already computet the value */
if (*inword == last_color_value) {
/* save a copy of the current color before it will be modified */
/* save a copy of the current color before it will be modified */
last_color_value = *inword;
NOBLACK(cyan, magenta, yellow, black);
-@@ -2492,6 +2526,7 @@
+@@ -2493,6 +2527,7 @@
debug_print_string(output, strlen(output));
}
#endif /* 0 */
if ( *cyan > 255) *cyan = 255;
if (*magenta > 255) *magenta = 255;
if ( *yellow > 255) *yellow = 255;
-@@ -2499,6 +2534,96 @@
+@@ -2500,6 +2535,96 @@
*cyan = *(cvalues + *cyan);
*magenta = *(mvalues + *magenta);
*yellow = *(yvalues + *yellow);