diff options
author | Philipp Knechtges <philipp-dev@knechtges.com> | 2021-06-12 22:16:43 +0200 |
---|---|---|
committer | Philipp Knechtges <philipp-dev@knechtges.com> | 2021-06-15 07:39:23 +0000 |
commit | 77eb02c23be27ce66b7f99bcd136356e20a0a12d (patch) | |
tree | 6ddf217dcd83a5d3f814b6c587816a5abd900eda /poppler/PSOutputDev.cc | |
parent | 557b86db954d2cbcb9665cec0ea6edb7b0da9e75 (diff) |
PSOutputDev: fix off-by-one error for image masking in L1/L2 output
Fixes issue #1088
Diffstat (limited to 'poppler/PSOutputDev.cc')
-rw-r--r-- | poppler/PSOutputDev.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/poppler/PSOutputDev.cc b/poppler/PSOutputDev.cc index 3fb0c703..aeba5fce 100644 --- a/poppler/PSOutputDev.cc +++ b/poppler/PSOutputDev.cc @@ -5620,8 +5620,8 @@ void PSOutputDev::maskToClippingPath(Stream *maskStr, int maskWidth, int maskHei } rectsOut[rectsOutLen].x0 = rects0[i].x0; rectsOut[rectsOutLen].x1 = rects0[i].x1; - rectsOut[rectsOutLen].y0 = maskHeight - y - 1; - rectsOut[rectsOutLen].y1 = maskHeight - rects0[i].y0 - 1; + rectsOut[rectsOutLen].y0 = maskHeight - y; + rectsOut[rectsOutLen].y1 = maskHeight - rects0[i].y0; ++rectsOutLen; ++i; } @@ -5661,8 +5661,8 @@ void PSOutputDev::maskToClippingPath(Stream *maskStr, int maskWidth, int maskHei } rectsOut[rectsOutLen].x0 = rects0[i].x0; rectsOut[rectsOutLen].x1 = rects0[i].x1; - rectsOut[rectsOutLen].y0 = maskHeight - y - 1; - rectsOut[rectsOutLen].y1 = maskHeight - rects0[i].y0 - 1; + rectsOut[rectsOutLen].y0 = maskHeight - y; + rectsOut[rectsOutLen].y1 = maskHeight - rects0[i].y0; ++rectsOutLen; } if (rectsOutLen < 65536 / 4) { @@ -5769,8 +5769,8 @@ void PSOutputDev::doImageL2(GfxState *state, Object *ref, GfxImageColorMap *colo } rectsOut[rectsOutLen].x0 = rects0[i].x0; rectsOut[rectsOutLen].x1 = rects0[i].x1; - rectsOut[rectsOutLen].y0 = height - y - 1; - rectsOut[rectsOutLen].y1 = height - rects0[i].y0 - 1; + rectsOut[rectsOutLen].y0 = height - y; + rectsOut[rectsOutLen].y1 = height - rects0[i].y0; ++rectsOutLen; ++i; } @@ -5826,8 +5826,8 @@ void PSOutputDev::doImageL2(GfxState *state, Object *ref, GfxImageColorMap *colo } rectsOut[rectsOutLen].x0 = rects0[i].x0; rectsOut[rectsOutLen].x1 = rects0[i].x1; - rectsOut[rectsOutLen].y0 = height - y - 1; - rectsOut[rectsOutLen].y1 = height - rects0[i].y0 - 1; + rectsOut[rectsOutLen].y0 = height - y; + rectsOut[rectsOutLen].y1 = height - rects0[i].y0; ++rectsOutLen; } if (rectsOutLen < 65536 / 4) { |