linebender / resvg

An SVG rendering library.
Mozilla Public License 2.0
2.79k stars 225 forks source link

complety wrong colour #240

Closed JoKalliauer closed 4 years ago

JoKalliauer commented 4 years ago

SVG:

Tradex Logo Wiki Mesa de trabajo 1.svg

png:

ink resvg
Tradex Logo Wiki Mesa de trabajo 1 Tradex Logo Wiki Mesa de trabajo 1_re

copyright

source https://commons.wikimedia.org/wiki/File:Tradex_Logo_Wiki_Mesa_de_trabajo_1.svg

author Jeshuajw

license https://creativecommons.org/licenses/by-sa/4.0/deed.de

RazrFalcon commented 4 years ago

The mix-blend-mode CSS property is not part of the SVG spec, so resvg is correct.

yisibl commented 3 years ago

I checked out some of the history and found some interesting things.

Tavmjong Bah is an Inkscape developer and documenter. He represents Inkscape on the W3C SVG working group and is the driver of several SVG 2 features such as mesh gradients, hatched fills, and auto-flowed text.

I found some information in his blog:

At the SVG Working Group meeting last week, the group approved moving the CSS Compositing and Blending Level 1 to a Candidate Recommendation. Since this a joint specification, the CSS Working group must also give their approval.

In the CSS "Compositing and Blending Level 1" specification it also says.

This specification also enhances the rules as specified in Section 14.2 Simple alpha compositing of [SVG11] and simple alpha compositing of [CSS3COLOR].

I think it's worth implementing, but of course it's not a high priority.

yisibl commented 3 years ago

Related issue: https://github.com/RazrFalcon/resvg/issues/421

RazrFalcon commented 3 years ago

SVG 2 spec is a mess. It's really hard to understand what was actually added compared to SVG 1. I've ended up writing my own SVG 2 changelog: https://github.com/RazrFalcon/resvg/blob/master/docs/svg2-changelog.md

yisibl commented 3 years ago

SVG 2 spec is a mess. It's really hard to understand what was actually added compared to SVG 1. I've ended up writing my own SVG 2 changelog: https://github.com/RazrFalcon/resvg/blob/master/docs/svg2-changelog.md

Yes, it sucks. I've read the change log you wrote in detail and it's great.

Also, I see that the document has not added the mask-type in SVG, can I submit a PR to add this properties?

RazrFalcon commented 3 years ago

Sure! Just make sure to add a link to the spec.