Bug 88394 - Circular shading is pixelated
Summary: Circular shading is pixelated
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
: 70259 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-01-14 09:50 UTC by dave lepore
Modified: 2015-12-25 04:40 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
pixelated circular shading (3.57 KB, text/plain)
2015-01-14 09:50 UTC, dave lepore
Details
pixelated circular shading (3.57 KB, application/pdf)
2015-01-14 09:52 UTC, dave lepore
Details
Implement cairo function shading (5.47 KB, patch)
2015-01-15 11:10 UTC, Adrian Johnson
Details | Splinter Review

Description dave lepore 2015-01-14 09:50:57 UTC
Created attachment 112208 [details]
pixelated circular shading

When the attached pdf is opened with a poppler based viewer the circular shading is rendered in a pixelated fashion, while in other viewer it looks smooth.
Comment 1 dave lepore 2015-01-14 09:52:01 UTC
Created attachment 112209 [details]
pixelated circular shading
Comment 2 Adrian Johnson 2015-01-15 11:10:42 UTC
Created attachment 112285 [details] [review]
Implement cairo function shading

The pdf contains a function based shading. Gfx subdivides the shading then draws each cell with a solid color resulting in a pixelated appearance for both cairo and splash. This could be fixed by reducing the size of each cell to 1 pixel. However this could significantly increase rendering time as the function has to be evaluated for each pixel.

The better fix is to interpolate the colors in each cell instead of using solid fills. I've fixed this for the cairo backend by using cairo mesh gradients to interpolate the colors in each cell.

I should also point out that the conical gradient in this particular pdf could have been created with a type 6 shading (coons patch meshes). This would produce a better result and does not rely on evaluating a type 4 PostScript calculator function.
Comment 3 Carlos Garcia Campos 2015-12-04 10:57:42 UTC
Pushed, sorry for the delay reviewing this. Thanks!
Comment 4 Jason Crain 2015-12-25 04:40:54 UTC
*** Bug 70259 has been marked as a duplicate of this bug. ***


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.