<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED --- - Add option to manually disable bilinear filtering"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=68360#c21">Comment # 21</a>
              on <a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED --- - Add option to manually disable bilinear filtering"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=68360">bug 68360</a>
              from <span class="vcard"><a class="email" href="mailto:dr.hyder@gmail.com" title="Charles Hyder <dr.hyder@gmail.com>"> <span class="fn">Charles Hyder</span></a>
</span></b>
        <pre>Reading Splash.cc:

----------

// determine if a scaled image requires interpolation based on the scale and
// the interpolate flag from the image dictionary
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;
}

-----------

I had to rearead the commend "When scale factor..." 3 or 4 times: I could not
believe what I was seeing.

<a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED --- - image scaling is ugly / not antialiased in Evince 2.28"
   href="show_bug.cgi?id=25268">https://bugs.freedesktop.org/show_bug.cgi?id=25268</a> -- here's what happened, in
simple words:

xpdf/early versions of Poppler used nearest neighbor scaling (same as discrete
sampling in the netpbm lingo). This, clearly, produced results much worse than
Adobe's, which uses pixel mixing, as it should. Some folks noticed that Evince
(based on Poppler) produces bad quality results and asked: how come Adobe does
so much better? Someone brought the "interpolate" tag into the discussion, and
as is usually the case when people don't know exactly what they are talking
about, there surfaced a hypothesis: "Adobe must be interpolating those images
despite the fact that the interpolate flag is not set" that is "Adobe is
cheating to get nice looking results". And so the developers introduced
interpolation for all images in Poppler. Soon people came forward who realized
that this downgrades the quality (essentially, the same issue as the one I
raised originally!). And so the compromise has been made: 

"When scale factor is >= 400% we don't interpolate."

Let me say a couple of things:

1) This "rule" is a) ad hoc; b) wrong
2) There's a fundamental misunderstanding: pixel mixing and interpolation are
two different things!

Again from Splash.cc:

    if (!tilingPattern && isImageInterpolationRequired(srcWidth, srcHeight,
scaledWidth, scaledHeight, interpolate)) {
      scaleImageYuXuBilinear(src, srcData, srcMode, nComps, srcAlpha,
                srcWidth, srcHeight, scaledWidth, scaledHeight, dest);
    } else {
      scaleImageYuXu(src, srcData, srcMode, nComps, srcAlpha,
            srcWidth, srcHeight, scaledWidth, scaledHeight, dest);
    }

So, basically, it's either "bilinear" (Adobe with "interpolate" set) or
"nearest neighbor" ("poor" quality xpdf-style; "poor" here refers to the
quality for non-integer scaling factors - this is the issue people were
discussing). What about pixel mixing?? There's a third (Adobe with
"interpolate" not set) way - the pixel mixing way!

Doing some more reading now, hold on...</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>