How to download svg as PNG file ? SVG may contain animations, so i don't want to use canvas, with below code i am able to download image in svg format, any suggestions please for converting svg to png in javascript?
var a = document.createElement('a');
a.href = 'data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="993" height="550">............';
a.download = 'image.svg';
a.click();
您可以使用Inkscape将svg图像转换为png,可以将其安装在Linux和Windows计算机上,但我建议Linux以获得更多详细信息,请参阅https://inkscape.org/en/
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.