I have a large SVG with several groups. Each group has a transform. I want to recalculate / flatten the transforms while preserving the groups.
<g id="a" transform="matrix(2 0 0 2 -69.46 -152.7)">
<path d="m64.3 645.3h165.9c3...
<path d="m123 567.4h963...
</g>
<g id="b" transform="matrix(3 0 0 3 -69.46 -152.7)">
<path d="m64.3 645.3h165.9c3...
<path d="m123 567.4h963...
</g>
...
All the solutions I've found so far involve using Inkscape and then ungrouping. I do not want to ungroup them - I have lots of groups and it is important that they stay grouped.
- SVGcleaner does not apply transforms to paths within groups.
- svgo has an outstanding bug for this
- Inkscape requires ungrouping.