Closed jamesWalker55 closed 7 months ago
SVG doesn't require dither, therefore we do not apply it either.
Sorry, I didn't mean dithering. The gradient is from #2d2d2d
at 0 opacity to #2d2d2d
at 1 opacity, so I'm not sure dithering is related
This is an expected behaviour: #677
You can try it yourself here: https://fiddle.skia.org/c/67cc2e6de7e644c8dd7402f86b1a1a68
I've tried recreating my setup (gray gradient on a gray background) on that site as follows: https://fiddle.skia.org/c/dfac4678c2c74d0ba855b199005591b0
Then I downloaded the images to an image editor for inspecting:
With increased contrast:
Interestingly, only the CPU version has color bands, the GPU version has no banding at all.
Since resvg uses CPU for rendering, I guess this is expected behaviour? I still wonder if there's any way to get rid of that banding with resvg. Please feel free to close this issue if this is not planned.
If you will figure it out - feel free to send a patch. I have no idea how to solve it.
I am trying to render the following SVG:
When rendering this to a PNG at a resolution of 16x3, resvg produces the following output:
When put over a solid
#2D2D2D
background, it causes some slight color banding:When I inspect the image, it seems the colors in the gradient differ significantly from
#2D2D2D
:Comparing it to the output I get from Affinity Designer, there is no color banding in its output: