[gs-bugs] [Bug 693049] raster out of phase

bugzilla-daemon at ghostscript.com bugzilla-daemon at ghostscript.com
Sun May 27 19:31:00 UTC 2012


http://bugs.ghostscript.com/show_bug.cgi?id=693049

--- Comment #2 from Henry Stiles <henry.stiles at artifex.com> 2012-05-27 19:30:59 UTC ---
(In reply to comment #1)
> The patch for this is to change the following line in gs/base/scfx.h
> 
> 
> @@ -56,7 +56,7 @@ typedef struct stream_CF_state_s {
>     (ss)->Columns = 1728,\
>     (ss)->Rows = 0,\
>     (ss)->EndOfBlock = true,\
> -   (ss)->BlackIs1 = false,\
> +   (ss)->BlackIs1 = true,\
>                  /* Added by Adobe since the Red Book */\
>     (ss)->DamagedRowsBeforeError = 0, /* always set, for s_CF_get_params */\
>     (ss)->FirstBitLowOrder = false,\

Actually I fixed this in my local tree a bit differently, the default should be
left as it is since it matches what PostsScript and PDF expect.  The PCL client
sets the BlackIs1 member when setting up the CCITT filter.  But you did solve
the problem, please claim the bounty.

I'll get this commit in the shared repository shortly.


commit bdf261cc8999e02bd7a22ea79ddfa812ff9cadb7
Author: Henry Stiles <henry.stiles at artifex.com>
Date:   Sat May 19 16:53:26 2012 -0600

    Fixes 693049 - incorrect ccitt raster output.

    The CCITT filter was initialized to an additive color space instead of
    subtractive.  Problem analyzed by Shailesh Mistry.

diff --git a/pcl/rtraster.c b/pcl/rtraster.c
index 73af067..a9975f1 100644
--- a/pcl/rtraster.c
+++ b/pcl/rtraster.c
@@ -986,6 +986,7 @@ process_ccitt_compress(
     s_init_state((stream_state*)&state, &s_CFD_template, prast->pmem);
     state.report_error = pcl_ccitt_error;
     s_CFD_template.set_defaults((stream_state*)&state);
+    state.BlackIs1 = true;
     state.EndOfLine = false;
     state.EndOfBlock = false;
     state.Columns = pl_get_uint32(pin);

-- 
Configure bugmail: http://bugs.ghostscript.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the gs-bugs mailing list