diff --git a/poppler/SplashOutputDev.cc b/poppler/SplashOutputDev.cc index 171825f..e137e37 100644 --- a/poppler/SplashOutputDev.cc +++ b/poppler/SplashOutputDev.cc @@ -4266,7 +4266,7 @@ GBool SplashOutputDev::tilingPatternFill(GfxState *state, Gfx *gfxA, Catalog *ca matc[1] = ctm[1]; matc[2] = ctm[2]; matc[3] = ctm[3]; - retValue = splash->drawImage(&tilingBitmapSrc, &imgData, colorMode, gTrue, result_width, result_height, matc, gTrue) == splashOk; + retValue = splash->drawImage(&tilingBitmapSrc, &imgData, colorMode, gTrue, result_width, result_height, matc, gFalse, gTrue) == splashOk; delete tBitmap; delete gfx; return retValue; diff --git a/splash/Splash.cc b/splash/Splash.cc index 6a1891e..37039a8 100644 --- a/splash/Splash.cc +++ b/splash/Splash.cc @@ -3682,7 +3682,7 @@ SplashError Splash::drawImage(SplashImageSource src, void *srcData, return splashErrBadArg; } scaledImg = scaleImage(src, srcData, srcMode, nComps, srcAlpha, w, h, - scaledWidth, scaledHeight, interpolate); + scaledWidth, scaledHeight, interpolate, tilingPattern); if (scaledImg == NULL) { return splashErrBadArg; } @@ -3720,7 +3720,7 @@ SplashError Splash::drawImage(SplashImageSource src, void *srcData, return splashErrBadArg; } scaledImg = scaleImage(src, srcData, srcMode, nComps, srcAlpha, w, h, - scaledWidth, scaledHeight, interpolate); + scaledWidth, scaledHeight, interpolate, tilingPattern); if (scaledImg == NULL) { return splashErrBadArg; } @@ -4063,7 +4063,7 @@ static GBool isImageInterpolationRequired(int srcWidth, int srcHeight, SplashBitmap *Splash::scaleImage(SplashImageSource src, void *srcData, SplashColorMode srcMode, int nComps, GBool srcAlpha, int srcWidth, int srcHeight, - int scaledWidth, int scaledHeight, GBool interpolate) { + int scaledWidth, int scaledHeight, GBool interpolate, GBool tilingPattern) { SplashBitmap *dest; dest = new SplashBitmap(scaledWidth, scaledHeight, 1, srcMode, srcAlpha, gTrue, bitmap->getSeparationList()); @@ -4081,7 +4081,7 @@ SplashBitmap *Splash::scaleImage(SplashImageSource src, void *srcData, scaleImageYuXd(src, srcData, srcMode, nComps, srcAlpha, srcWidth, srcHeight, scaledWidth, scaledHeight, dest); } else { - if (isImageInterpolationRequired(srcWidth, srcHeight, scaledWidth, scaledHeight, interpolate)) { + if (!tilingPattern && isImageInterpolationRequired(srcWidth, srcHeight, scaledWidth, scaledHeight, interpolate)) { scaleImageYuXuBilinear(src, srcData, srcMode, nComps, srcAlpha, srcWidth, srcHeight, scaledWidth, scaledHeight, dest); } else { diff --git a/splash/Splash.h b/splash/Splash.h index 8bcd1db..cc98d2d 100644 --- a/splash/Splash.h +++ b/splash/Splash.h @@ -364,7 +364,7 @@ private: SplashBitmap *scaleImage(SplashImageSource src, void *srcData, SplashColorMode srcMode, int nComps, GBool srcAlpha, int srcWidth, int srcHeight, - int scaledWidth, int scaledHeight, GBool interpolate); + int scaledWidth, int scaledHeight, GBool interpolate, GBool tilingPattern = gFalse); void scaleImageYdXd(SplashImageSource src, void *srcData, SplashColorMode srcMode, int nComps, GBool srcAlpha, int srcWidth, int srcHeight,