summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Watts <Robin.Watts@artifex.com>2022-03-15 19:53:46 +0000
committerChris Liddell <chris.liddell@artifex.com>2022-03-18 14:59:54 +0000
commit7c72c8dc8b5d24c57ec312ba7da0ae1cc19d99ec (patch)
tree92fa9c54682eb2d8355bf25e970a600313b3b7df
parent5fe83e180b2c8a837c8b36371e48643a5a08d655 (diff)
downloadghostpdl-7c72c8dc8b5d24c57ec312ba7da0ae1cc19d99ec.tar.gz
Bug 705063: Fix blank_unmasked_bits to work msb, not lsb.
When working with alphabits, we read pixels back from the destination buffer, process it, and then write it out again. The reading of the current pixels is done via get_bits_rectangle. When working with a mask, this calls blank_unmasked_bits to avoid returning undefined values. This routine was incorrectly written to read the mask as it pixels were packed into a byte least significant bit first. Correct it to work most significant bit first.
-rw-r--r--base/gxpcmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/base/gxpcmap.c b/base/gxpcmap.c
index ae79987f0..86af08854 100644
--- a/base/gxpcmap.c
+++ b/base/gxpcmap.c
@@ -676,7 +676,7 @@ blank_unmasked_bits(gx_device * mask,
for (x = 0; x < w; x++)
{
int xx = x+x0;
- if (((mine[xx>>3]>>(x&7)) & 1) == 0) {
+ if (((mine[xx>>3]<<(x&7)) & 128) == 0) {
switch (depth)
{
case 8: