If you might have noticed, I posted a message about the plugin/extension I wrote to upload images to Flickr/Picasaweb.

An important part of this plugin is to convert SVG to JPEG, because both of the above services don't accept SVG images. So the solution I am using in the current version of plugin is, using ImageMagick's "convert" command to do the above image format transformation. This is not an elegant approach, in my opinion. I can't get it to work on windows, etc.

I know Inkscape can let you save an SVG image as jpeg. But don't know how to do this programmatically. My extension works as an "output" extension, so it is triggered by the filename extension (.web). This mechanism pretty much isolates the extension developer from having programmatic interface with inkscape functionality. So I am not sure how I can access inkscape's svg-2-jpeg functionality, if at all there is an API exposing it.

It is also a possibility to fork another inkscape instance as command line and use --export-png to convert to PNG (I think flickr/picasa will accept png). But the conversion result was very poor when I tried it. When the SVG image contained some simple black lines on a white background, the resultant PNG contained only black lines and no background.

Any suggestions around these ideas will help.

Thanks in advance.