Converting SVG+Javascript files to PNG

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Ernest
Posts: 3
Joined: 2011-03-26T08:53:40-07:00
Authentication code: 8675308

Converting SVG+Javascript files to PNG

Post 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
Mazin
Posts: 10
Joined: 2008-11-24T13:30:50-07:00

Re: Converting SVG+Javascript files to PNG

Post by Mazin »

There is no way to know if Javascript code, if any, will ever finish running.
Ernest
Posts: 3
Joined: 2011-03-26T08:53:40-07:00
Authentication code: 8675308

Re: Converting SVG+Javascript files to PNG

Post 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
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Converting SVG+Javascript files to PNG

Post 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
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Ernest
Posts: 3
Joined: 2011-03-26T08:53:40-07:00
Authentication code: 8675308

Re: Converting SVG+Javascript files to PNG

Post by Ernest »

Thank you. (but neither msvg: nor rsvg: seem to handle JavaScript)

I'll probably have to use Postscript.


xof
Post Reply