Recently, the number of sites using SVG instead of images has increased. Although it is a good thing, there are also many software which does not correspond yet, and there are some inconveniences when using it. In such a case, doing a troublesome thing to display SVG with a web browser and take a screen shot of it.
The open source software introduced this time is software to convert svg2png, SVG to PNG by CLI.
How to use svg2png
Command option of svg2png.
$ svg2png --helpConverts SVGs to PNGs, using PhantomJSsvg2png input.svg [--output=output.png] [--width=300] [--height=150]Options:-o, --output The output filename; if not provided, will be inferred [String]-w, --width The output file width, in pixels [String]-h, --height The output file height, in pixels [String]--help --version
It is an actual conversion example.
It is convenient for the size to be flexible.
By using svg2png you can image SVG files with your own size. It would be useful to have svg2png when making presentation materials or printing. SVG is useful in SVG, but it is software that will expand more availability.
svg2png is node / JavaScript software (license is DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE).
No comments:
Post a Comment