vincerubinetti / svg-to-png Goto Github PK
View Code? Open in Web Editor NEWConvert SVG to PNG right in your browser, reliably and correctly
Home Page: https://vincerubinetti.github.io/svg-to-png/
License: MIT License
Convert SVG to PNG right in your browser, reliably and correctly
Home Page: https://vincerubinetti.github.io/svg-to-png/
License: MIT License
Everything seems great, but the ability to convert many SVGs to PNG all at once with chosen settings such dimensions is appreciated.
Posting this here as an issue, rather than in the readme, because I think Firefox usage is relatively low.
There is a peculiar and frustrating bug in Firefox where it won't draw an SVG to a canvas if the root <svg>
element doesn't have both width
and height
attributes explicitly specified, and in absolute units.
Stack Overflow post with top answer by the person who wrote most of the Firefox SVG code:
https://stackoverflow.com/questions/28690643/firefox-error-rendering-an-svg-image-to-html5-canvas-with-drawimage
Bug report:
https://bugzilla.mozilla.org/show_bug.cgi?id=700533
There is a workaround I can do, but it's a very dirty hack. It also could alter the behavior on other (more used) browsers, so I'd have to attempt to detect when it's firefox, which is brittle.
So, I'm going to leave it as is.
If you're a user running into this issue, try using another browser or add width="xxx" height="xxx"
to your <svg>
.
When you unclick the box that says "transparent," in the preview the background color immediately goes to black. When you alter the background color using the little RGB popout and then click outside to close the popout, the background color on the preview does not change to match the new color. I clicked download and the background color was still black as well.
Hello,
Firstly, I want to express my appreciation for this project. The speed and superb results have greatly benefitted my work. However, I've hit a snag and would appreciate your help.
I am currently working on a Python project where I need to incorporate the functionality that your project offers - specifically, converting SVG files to PNG. As you may know, Python isn't compatible with TypeScript, which leaves me in a difficult spot.
To navigate around this issue, I was hoping you might consider developing an API that takes an SVG file path URL and returns a PNG file path URL. This way, I can continue to benefit from your great work without the language barrier.
Given an SVG file path URL such as https://sample.com/inputfile.svg, the API would return the PNG file path URL, e.g., https://vincerubinetti.github.io/svg-to-png/output.png.
Looking forward to your constructive response.
Thank you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.