dnkl :emacs: · @dnkl
281 followers · 968 posts · Server linuxrocks.online

My project (notification daemon) uses to render SVG icons.

I've always thought the rendered icons looked bad, compared to the ones rendered by librsvg. I chalked it up to nanosvg being "simple stupid" [sic].

Turns out /I'm/ stupid.

Nanosvg produces RGBA output that is NOT pre-multiplied.

But, pixman expects pre-multiplied color channels.

Blend a non-premultplied image as if it was pre-multiplied, and the result is, well, crap.

github.com/memononen/nanosvg

#nanosvg #fnott

Last updated 3 years ago