export inkscape SVG to PNG from commandline

Dear list,
Would anyone have a script lying around to export inkscape SVGs to PNG from the commandline ?
Any pointer would be appreciated.
Kind regards, Tobias

for windows, try:
inkscape -f <infile.svg> -e <outfile.png>
You might have to provide paths.
Or to convert a whole directory:
for i in *.svg do inkscape -f "$i" -e "$i.png"
-Rob A>
On Dec 4, 2007 8:00 AM, Tobias Verbeke <tobias.verbeke@...2414...> wrote:
Dear list,
Would anyone have a script lying around to export inkscape SVGs to PNG from the commandline ?
Any pointer would be appreciated.
Kind regards, Tobias
SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 _______________________________________________ Inkscape-user mailing list Inkscape-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-user

Tobias Verbeke a écrit :
Dear list,
Would anyone have a script lying around to export inkscape SVGs to PNG from the commandline ?
rsvg
Any pointer would be appreciated.
Kind regards, Tobias
SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 _______________________________________________ Inkscape-user mailing list Inkscape-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-user

Stéphane ANCELOT wrote:
Tobias Verbeke a écrit :
Dear list,
Would anyone have a script lying around to export inkscape SVGs to PNG from the commandline ?
rsvg
You could also use ImageMagick http://www.imagemagick.org/. You can even export SVG's to PNG's at 16-bit & with optional alpha channel. This is a good way to circumvent the 8-bit limitations of the Inkscape PNG export.
ImageMagick is invoked via command line. In the case of Inkscape/SVG, this would be something such as:
'convert -depth 16 -background transparent [your_SVG].svg [your_PNG].png'
And you can do much more! Imho, ImageMagick is just a great addition to Inkscape.
HTH,
Claus

"Tobias Verbeke" <tobias.verbeke@...2414...> writes:
Dear list,
Would anyone have a script lying around to export inkscape SVGs to PNG from the commandline ?
Anything wrong with
inkscape --export-png=output.png \ --export-width=60 --export-height=60 \ input.svg
(there is also --export-area to process part of the image instead of the whole image)
participants (6)
-
Claus Cyrny
-
Donn
-
Marcin Kasperski
-
Rob Antonishen
-
Stéphane ANCELOT
-
Tobias Verbeke