[Pixman] [patch] Gradient dithering into pixman
spitzak at gmail.com
Tue Mar 27 01:47:51 UTC 2018
I don't understand why you would want to disable it when writing .png
files. There will be banding in the .png file, which I would think is worse
than the increased size. Also kind of fools the user if they did not look
at the .png file and only at InkScape's display.
On Mon, Mar 26, 2018 at 5:04 PM, Søren Sandmann <soren.sandmann at gmail.com>
> A long time ago I wrote this:
> about how dithering could be added to pixman. The basic idea is that
> "dithering" is a property of the destination image, not of the gradient. I
> still think this is the right way to do it.
> On Mon, Mar 26, 2018 at 6:37 PM, Marc Jeanmougin <marc at jeanmougin.fr>
>> I'm Marc, I'm an Inkscape contributor, and I would like to improve
>> pixman by providing a patch to allow gradient dithering, to eliminate
>> all gradient banding. This "banding" problem is hugely visible in many
>> Inkscape files, and I hope you could help me putting it into pixman,
>> then in exposing the functionality into cairo.
>> I tried to very closely follow the existing code style, and I came up
>> with the proof of concept (attached Proof_of_concept.patch ), which
>> applies to pixman/master to enable the feature directly.
>> Since Inkscape also uses pixman to render files when exporting to png,
>> and that kind of dithering affects very significantly the file size (PNG
>> compression algorithm and randomness don't mix well) we also need a
>> switch to enable/disable it "at will".
>> I tried to understand how it could be done by looking at
>> pixman_image_set_* functions and finally came up with the other patch
>> attached 0001-Adds-a-gradient-dithering-function-to-pixman.patch (which
>> cannot directly be tested, since it would require changes in cairo to
>> call pixman_image_set_dithering, but changing "gradient->dithering =
>> PIXMAN_DITHERING_NONE;" to _BEST in pixman-image.c works)
>> Thanks for any help in merging this, or any pointer to how to improve it,
>> Pixman mailing list
>> Pixman at lists.freedesktop.org
> Pixman mailing list
> Pixman at lists.freedesktop.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pixman