--- poppler-git-8nov13/splash/Splash.cc- 2013-11-08 18:32:39.933561374 +0100 +++ poppler-git-8nov13/splash/Splash.cc 2013-11-08 19:02:27.807999199 +0100 @@ -4816,13 +4816,26 @@ for (int i = 0; i < nComps; i++) srcBuf[srcWidth*nComps + i] = srcBuf[(srcWidth-1)*nComps + i]; - for (int x = 0; x < scaledWidth; x++) { - xFrac = modf(xSrc, &xInt); - p = (int)xInt; - for (int c = 0; c < nComps; c++) { - dstBuf[nComps*x + c] = srcBuf[nComps*p + c]*(1.0 - xFrac) + srcBuf[nComps*(p+1) + c]*xFrac; + if (scaledWidth == 2*srcWidth) { + for (p = 0; p < srcWidth; p++) { + int x = 2*p; + for (int c = 0; c < nComps; c++) { + dstBuf[nComps*x + c] = srcBuf[nComps*p + c]; + } + x++; + for (int c = 0; c < nComps; c++) { + dstBuf[nComps*x + c] = (srcBuf[nComps*p + c] + srcBuf[nComps*(p+1) + c]) / 2; + } + } + } else { + for (int x = 0; x < scaledWidth; x++) { + xFrac = modf(xSrc, &xInt); + p = (int)xInt; + for (int c = 0; c < nComps; c++) { + dstBuf[nComps*x + c] = srcBuf[nComps*p + c]*(1.0 - xFrac) + srcBuf[nComps*(p+1) + c]*xFrac; + } + xSrc += xStep; } - xSrc += xStep; } }