From 331fcb49b62a615976711cccdd3ff9796152a323 Mon Sep 17 00:00:00 2001 From: Ray Johnston Date: Wed, 17 Feb 2021 13:05:35 -0800 Subject: Fix bug 703245: bitmap size exceeds buffer. The pdf14 compositor changes the color depth to 8 for a SMask, but the compositor actions were not being put in all the bands needed. In this case the copy_color_alpha was output from the interpolation logic because the image gridfitting expanded the image. Fix it by expanding the top and bottom limits for the "temp_cropping" which controls the RECT loop writing the compositor info to the bands. --- base/gxclimag.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'base/gxclimag.c') diff --git a/base/gxclimag.c b/base/gxclimag.c index 8d398313b..4e21b551c 100644 --- a/base/gxclimag.c +++ b/base/gxclimag.c @@ -1376,6 +1376,11 @@ clist_create_compositor(gx_device * dev, temp_cropping_min = cdev->cropping_min; temp_cropping_max = cdev->cropping_max; } + /* Adjust the lower and upper bound to allow for image gridfitting changing boundaries */ + if (temp_cropping_min > 0) + temp_cropping_min--; + if (temp_cropping_max < dev->height - 1) + temp_cropping_max++; if (temp_cropping_min < temp_cropping_max) { /* The pdf14 compositor could be applied only to bands covered by the pcte->params.bbox. */ -- cgit v1.2.1