Bug 702970

Summary: mupdf renders PDF incorrectly
Product: MuPDF Reporter: Ray Johnston <ray.johnston>
Component: mupdfAssignee: Robin Watts <robin.watts>
Status: NOTIFIED FIXED    
Severity: normal CC: robin.watts
Priority: P2    
Version: master   
Hardware: All   
OS: All   
Customer: 200 Word Size: ---
Attachments: i.pdf

Description Ray Johnston 2020-10-07 15:04:31 UTC
Created attachment 19925 [details]
i.pdf

When displayed with mupdf (or converted to raster with mutool convert), this
file produces a large almost white circle in the upper right that is not there
with Adobe or Ghostscript.

I've simplified the original file (a bit -- still complex), run it through
pdfwrite, then expanded it with "mutool clean -d" and it shows the issue with
much less else.

Guessing it is a SMask issue since the shaded circle looks like it might be
using an inverted mask or something.

command line:  mupdf i.pdf
Comment 1 Ray Johnston 2020-10-07 15:06:54 UTC
Assigning to Tor, but he may want to pass it off to someone else.

Attachment not made private since it is simplified and sanitized enough that
it won't contain any sensitive info.
Comment 2 Robin Watts 2020-10-21 18:00:29 UTC
Fixed in:

commit 9ed416cd3b960daa95e21ec230d151d8618bf7df
Author: Robin Watts <Robin.Watts@artifex.com>
Date:   Wed Oct 21 17:40:56 2020 +0100

    Bug 702970: Fix clipping problems with group alpha.

    If we have a non-rectangular clipping region, in the presence of
    group alpha, we make a new group alpha plane (as we need to, so
    we don't render to clipped areas), but initialise it to be empty.
    We ought to copy it from the existing group alpha plane.

    Same deal for shape planes.