summaryrefslogtreecommitdiff
path: root/pcl
diff options
context:
space:
mode:
authorHenry Stiles <henry.stiles@artifex.com>2011-07-06 17:29:24 -0600
committerHenry Stiles <henry.stiles@artifex.com>2011-07-06 17:29:24 -0600
commit7531d50c7b6dec596e142ff555f3cbfc28613abe (patch)
tree60aacd0ccd9f110f6092d3d97387c7e0932a1740 /pcl
parent6e1c268d0ceb3d39e33d242132a917ac27cc2491 (diff)
Shailesh Mistry's fix for 692311 - corrupt character rendering.
In adaptive compression mode the seed row for delta row compression was not properly cleared. With this change the code is now compatible with HP monochrome printers, previously the Artifex code was compatible with HP Color Laserjets. We do not implement a device specific switch - for example the new code could be enabled if the current mode of emulation was PCL5E (mono PCL) and not PCL5C (color PCL) allowing emulation of both product types. However the corrupt character output of HP color printers is probably never an intended result.
Diffstat (limited to 'pcl')
-rw-r--r--pcl/rtraster.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/pcl/rtraster.c b/pcl/rtraster.c
index 24c3109f8..bbea93049 100644
--- a/pcl/rtraster.c
+++ b/pcl/rtraster.c
@@ -928,11 +928,13 @@ process_adaptive_compress(
byte * pdata = pseed_row->pdata;
uint row_size = pseed_row->size;
int code = 0;
+ int cmd = NO_COMPRESS;
+ uint param = 0;
prast->plane_index = 0;
while ((insize >= 3) && (code >= 0)) {
- int cmd = *pin++;
- uint param = *pin++;
+ cmd = *pin++;
+ param = *pin++;
param = (param << 8) + *pin++;
insize -= 3;
@@ -985,6 +987,13 @@ process_adaptive_compress(
break;
}
+ /* clear the seed rows if Delta Row Compression at end of raster block */
+ if (cmd == DELTA_ROW_COMPRESS)
+ {
+ memset(pdata, 0, row_size);
+ pseed_row->is_blank = true;
+ }
+
return code;
}