View Single Post
Old 15th August 2017, 02:11   #9  |  Link
patul
Registered User
 
Join Date: Sep 2005
Posts: 130
Have you try phantomjs? It has svg rendering capability since it uses WebKit, however I don't know whether it's good enough for your requirement.

It's lightweight (17MB only), just download and extract it then find rasterize.js in example folder and issue following command.

PHP Code:
phantomjs rasterize.js this.svg this.png 
Edit:
Another way is to use IMG tag to render the svg in an HTML file, then open the html file using Chrome, you'll have access to "Copy Image" on the context menu (right click) to copy the rendered image to the clipboard, then you can paste the clipboard into your preferred image editor.

PHP Code:
<img src="this.svg" style="height: 100%; width: 100%; margin-top: 0; margin-left: 0"
Ref:
here

Last edited by patul; 15th August 2017 at 05:33. Reason: add alternative method
patul is offline   Reply With Quote