[Poppler-bugs] [Bug 90570] pdftoppm shows black line artifacts with aaVector enabled

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sun May 24 03:09:53 PDT 2015


https://bugs.freedesktop.org/show_bug.cgi?id=90570

--- Comment #4 from William Bader <williambader at hotmail.com> ---
Reviewing the changes in the commit identified by git bisect, I found that I
could fix the problem by commenting out the lines
  if (out->useShadedFills( shading->getType())) {
    if (out->gouraudTriangleShadedFill( state, shading))
      return;
  }
in Gfx::doGouraudTriangleShFill() in Gfx.cc.

That is not a good solution because gouraudTriangleShadedFill() is an important
optimization, but at least it narrows down the problem.

The image is a rectangle with a shaded fill background that is light in the
center and dark at the edges.
gouraudTriangleShadedFill() processes it as four triangles.
Each triangle has the center as a vertex and one of the edges as a side.
The artifacts in the image correspond to the sides of the triangles from the
vertex to each of the corners.

The loop through the triangles in Splash::gouraudTriangleShadedFill() is the
problem.  The loop does the calculation correctly and then calls
shading->getParameterizedColor() to write the color into bitmapData[].

SplashGouraudPattern::getParameterizedColor() in SplashOutputDev.cc calls
convertGfxColor().

splashColorCopy() in SplashTypes.h always copies 8 bytes if SPLASH_CMYK is
enabled.  Since the bitmap in my test file is RGB8, it should copy only 3
bytes.
Since each row of the triangle is filled left to right, the overwrite is not a
problem because any overwrite in data[X] is fixed in the next time around the
loop for data[X+1].  But any overwrites by the rightmost cell of the last
triangle do not get fixed by later data so the overwrite leaves 0's in some of
the color values.  Those 0's create the artifacts.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/poppler-bugs/attachments/20150524/e0c70e6a/attachment.html>


More information about the Poppler-bugs mailing list