Comment 18 for bug 180693

Revision history for this message
Jaspervdg (jaspervdg) wrote :

I actually experimented with adding dithering years back. It does work, but you should realize that it tends to have a pretty large impact on file sizes, and that it can be annoying if you want to use the result for further processing. I also seem to remember there were some issues with error accumulation if you applied any dithering before blending and/or filtering. In the end I concluded that it would be way better to "simply" support 16 bit (although it looked like this increased file size even more). Still, an option never hurt anyone of course.

I am not sure blending in noise after the fact is necessarily a good idea though. If someone really wants this they can always do this after the fact, and exporting intentionally noisy images might reflect badly on Inkscape. It is also not entirely clear it would actually help as much as true dithering, as the point with dithering is that the truncated part gets translated into the local distribution (which you cannot do if you already truncated the values). However, it might not be terribly difficult to implement dithering in pixman (if I had to guess I would say that this would be a good starting place: http://cgit.freedesktop.org/pixman/tree/pixman/pixman-gradient-walker.c).