shithub: jbig2

Download patch

ref: dcb83f94c6dc0280a8edeb4dc303fc1451bcd881
parent: 4a8c95e32a1a05dbf5587ff2262ea225f2dd6c2b
author: giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
date: Wed Jul 27 19:49:03 EDT 2005

Fix an off-by-one in reading the SBDEFPIXEL and SBCOMBOP fields of
the text region segment flags, which caused us to clear the region
background to the wrong value. Bug 688244.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@419 ded80894-8fb9-0310-811b-c03f3676ab4d

--- a/jbig2_text.c
+++ b/jbig2_text.c
@@ -372,8 +372,8 @@
     params.SBSTRIPS = 1 << ((flags & 0x000c) >> 2);
     params.REFCORNER = (flags & 0x0030) >> 4;
     params.TRANSPOSED = flags & 0x0040;
-    params.SBCOMBOP = (flags & 0x00e0) >> 7;
-    params.SBDEFPIXEL = flags & 0x0100;
+    params.SBCOMBOP = (flags & 0x0180) >> 7;
+    params.SBDEFPIXEL = flags & 0x0200;
     params.SBDSOFFSET = (flags & 0x7C00) >> 10;
     params.SBRTEMPLATE = flags & 0x8000;