Bug 693459 - 'Thin' non-orthogonal clip regions do not stack nicely
Summary: 'Thin' non-orthogonal clip regions do not stack nicely
Status: IN_PROGRESS
Alias: None
Product: MuPDF
Classification: Unclassified
Component: mupdf (show other bugs)
Version: master
Hardware: PC Windows XP
: P4 enhancement
Assignee: Robin Watts
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-23 10:48 UTC by Robert Jędrzejczyk
Modified: 2012-12-13 16:24 UTC (History)
2 users (show)

See Also:
Customer:
Word Size: ---


Attachments
mupdf render page 5 (240.35 KB, image/png)
2012-11-23 10:49 UTC, Robert Jędrzejczyk
Details
acrobat render page 5 (183.13 KB, image/png)
2012-11-23 10:49 UTC, Robert Jędrzejczyk
Details
ghostscript render page 5 (213.17 KB, image/jpeg)
2012-11-23 11:06 UTC, Robert Jędrzejczyk
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Jędrzejczyk 2012-11-23 10:48:15 UTC
Please download file from:

http://data.bonprixflyers.com/rjuploader/2012-11-14/32730/32731/1352913166086_0013985_1_A5_36_pp_proof.pdf

For example please try render page 5.

The problem is missing rendering image 
under text "Le Livert d'Information".

See attached screenshots.
Comment 1 Robert Jędrzejczyk 2012-11-23 10:49:03 UTC
Created attachment 9094 [details]
mupdf render page 5
Comment 2 Robert Jędrzejczyk 2012-11-23 10:49:41 UTC
Created attachment 9095 [details]
acrobat render page 5
Comment 3 Robert Jędrzejczyk 2012-11-23 11:06:37 UTC
Created attachment 9096 [details]
ghostscript render page 5
Comment 4 James Cloos 2012-11-23 22:42:35 UTC
I bet the images (one per line it seems) which make up the mis-rendered section are in a different cmyk color space than the rest of the page.

I expect that enhancing mu to use lcms2 would fix this one.
Comment 5 Robert Jędrzejczyk 2012-11-24 07:40:12 UTC
This is not problem with diffrent color space of images, etc. but with antialiasing. Please try to render page 5 with diffrent values of antialiasing level, then you see diffrent results.
Comment 6 James Cloos 2012-11-24 20:37:45 UTC
> try to render page 5 with different values of antialiasing

That is an interesting effect.

Perhaps it is a downscaling issue, then?

It does look better at 300 dpi than at 100 dpi.
Comment 7 Robin Watts 2012-12-03 12:12:59 UTC
The problem with this file is that the inset image is actually several hundred 1 pixel high images stacked on top of one another. Ordinarily we cope with this quite well, but the fact that the images are rotated hurts us a bit. We'd even cope with this, but the real killer is that each of these images has a 1 pixel high clip path, set for it, and these too are rotated.

MuPDF renders these clip paths by rendering them to a greyscale pixmap and then masking the contents through these. This gives us nice antialiasing of clips - but in this case results in the contents coming out too light.

The solution I have here involves changing MuPDF to render all clip regions without antialiasing. This means that every pixel in the clip will either be full on or off. I believe this is more in keeping with how Acrobat works.

We are evaluating whether this will have an overly adverse effect on other files now.
Comment 8 Robin Watts 2012-12-06 20:55:39 UTC
It does indeed cause other files to look nasty. Continuing to think about this, but I suspect this will be left as a 'looks bad due to stupid PDF file construction' case for a while.