* Jakub Wilk <jw...@debian.org>, 2014-09-11, 15:19:
I think I could disable bilinear scaling in pdf2djvu, although I'd
have to double check.
So I was wrong. Poppler uses this functin to decide whether to
interpolate images or not:
static GBool isImageInterpolationRequired(int srcWidth, int srcHeight,
int scaledWidth, int scaledHeight,
GBool interpolate) {
if (interpolate)
return gTrue;
/* When scale factor is >= 400% we don't interpolate. See bugs #25268, #9860 */
if (scaledWidth / srcWidth >= 4 || scaledHeight / srcHeight >= 4)
return gFalse;
return gTrue;
}
While I could force the “interpolate” flag to be always false, the
function returns true in the typical case anyway! And the function is
static, so there's no way to preempt it. :-(
This isImageInterpolationRequired() implementation does not seem to be
compliant with what PDF Reference 1.7 says:
“When the resolution of a source image is significantly lower than that
of the output device, each source sample covers many device pixels. As a
result, images can appear jaggy or blocky. These visual artifacts can be
reduced by applying an image interpolation algorithm during rendering.
Instead of painting all pixels covered by a source sample with the same
color, image interpolation attempts to produce a smooth transition
between adjacent sample values. Image interpolation is enabled by
setting the Interpolate entry in the image dictionary to true. It is
disabled by default because it may increase the time required to render
the image.
Note: The interpolation algorithm is implementation-dependent and is not
specified by PDF. Image interpolation may not always be performed for
some classes of images or on some output devices.”
--
Jakub Wilk
--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org