RazrFalcon / resvg

An SVG rendering library.
Mozilla Public License 2.0
2.74k stars 220 forks source link

Support rendering to u16/f32 per channel pixel formats #355

Closed virtualritz closed 1 year ago

virtualritz commented 3 years ago

See subject.

Eight bit/channel are not enough for most smooth gradients etc.

RazrFalcon commented 3 years ago

SVG is technically 8bit only. I don't know any app that supports rendering SVG to 16/32bit bitmaps.

On the other hand, since we're using our own rendering library, it fairly easy to implement. So this basically blocked only by tiny-skia.

virtualritz commented 3 years ago

The colors are specified in 8bit. As soon as you blend them in any meaningful way (opacity, interpolation etc), you end up aliasing if you promote the result back to 8bit. Yes, you can dither but that's not the same.

I think this would be great to have.

RazrFalcon commented 1 year ago

Out of scope. This should be done by tiny-skia anyway: https://github.com/RazrFalcon/tiny-skia/issues/63