in reply to Platform independent SVG transcoding

It could be that I don't fully understand your situation and contraints, but it sounds like you may be going all-out when a simpler solution might do the trick.

Why not use your webserver app to do the transcoding on your end, then provide an additional download link that users can click on to download a png version of the image.

If there is a specific need for the client machine/browser to do the transcoding, please reply with further detail.
  • Comment on Re: Platform independent SVG transcoding

Replies are listed 'Best First'.
Re^2: Platform independent SVG transcoding
by jbenezech (Acolyte) on Aug 10, 2009 at 08:56 UTC
    First, to answer last question, this is my requirement: a "save as image" link that would download a png version of the current svg displayed. This needs to be dynamic generation as the image depends on user actions on the browser that will alter the svg.
    Maybe I misunderstand something about using ImageMagick. I got the impression that the piece of Software needs to be installed on the server (which the web host provider will not do). Is that incorrect ?

      I'm not aware of any SVG to PNG solution that does not require software, or at least a module, to be installed on the server. ImageMagick is a module that would need to be installed on the server.

      As an alternative to SVG, maybe you want to use GD and GD::SVG or SVG::GD, which will allow you to produce graphs in both SVG and PNG (or GIF) formats.

      If you're lucky, your webhoster has a C compiler installed on the hosting machine so you can compile and install ImageMagick or any of the other solutions yourself. Other than that, you'll have to either find another solution than producing SVG images in the first place, or find a webhoster that is willing to accomodate its paying customers better.


        Thanks all for the advices. Guess I'll try to convince the host to install ImageMagick (Software + perl module), really don't want to give up on svg client...
        Ok, thought I'll give ImageMagick a try and then worry about convincing my webhost to install it.
        And there, I run into a problem with parsing of svg: when reading an svg which has a viewbox set to a portion of the entire image, ImageMagick renders only the top left corner of the whole image.

        Is there any known issue with ImageMagick not being able to analyze the svg viewBox correctly ? Note that I get same result with command line convert and Image Display just displays a blank image.
        I know it's more a question for image magick forum but it doesn't seem to be as reactve as this one...