Page 1 of 1

Converting SVG+Javascript files to PNG

Posted: 2011-03-26T09:42:41-07:00
by Ernest
Hi,

I would like to use ImageMagick to convert an .SVG file containing JavaScript code to .PNG file. Is it possible? (why not?)

An example would be to get a rule_110.png (http://en.wikipedia.org/wiki/Rule_110 ) from

http://users.skynet.be/chricat/automate.svg

I can display it with Firefox and take a screenshot but I am then limited by my screen width.
(Another example would be to draw a scale on a picture like in
http://commons.wikimedia.org/wiki/File: ... ue_DVD.jpg )

Thank you,

xof

Re: Converting SVG+Javascript files to PNG

Posted: 2011-04-12T16:54:45-07:00
by Mazin
There is no way to know if Javascript code, if any, will ever finish running.

Re: Converting SVG+Javascript files to PNG

Posted: 2011-04-18T03:43:14-07:00
by Ernest
You are right (nobody knows if a Javascript program will ever end), but it is the same with Postcript files.

And I can 'convert' postscript files.


xof

Re: Converting SVG+Javascript files to PNG

Posted: 2011-04-18T04:36:56-07:00
by anthony
Note also that there is two methods of processing SVG. The internal MSVG which will definatally not handle Java script, and a external delegate library RSVG. I don't know if RSVG handles java script.

see http://www.imagemagick.org/Usage/draw/#svg

Re: Converting SVG+Javascript files to PNG

Posted: 2011-04-20T22:57:46-07:00
by Ernest
Thank you. (but neither msvg: nor rsvg: seem to handle JavaScript)

I'll probably have to use Postscript.


xof