Exporting files en masse

Asked by Stephen Taylor

I want to create a 'cartoon' style film. Is there a way I can export my SVG files en masse into PNG? Or do I have to open, Save As PNG, close for every one? A long job!!!

Thanks,
Stephen

Question information

Language:
English Edit question
Status:
Solved
For:
Inkscape Edit question
Assignee:
No assignee Edit question
Solved by:
Stephen Taylor
Solved:
Last query:
Last reply:
Revision history for this message
pbhj (pbhj) said :
#1

On a linux (or similar box) it would be something like this (untested YMMV, I'm using BASH here your shell might differ):

for name in $(ls /path/to/files | grep -i png) ; do inkscape --without-gui --file=$name --export-png=$name.png --export-dpi=300; done

Look at additional options on "inkscape --help" to determine how to export with for example a particular background colour or to export something other than the whole page, etc..

The above will take all PNG files in the given path (/path/to/files) and then run inkscape without the window showing, exporting each file as filename.png.svg at 300dpi.

Revision history for this message
Stephen Taylor (dusk) said :
#2

Thanks, but unfortunately the first bit's above my head and so far I haven't located a means of exporting anything other than from within an open file.

Revision history for this message
Stephen Taylor (dusk) said :
#3

Probably the answer is to use"

  InkscapeBatch

ConversionSVG is a GUI that send command line to Inkscape to export in batch SVG to PNG, PS, PDF or EPS. It features a Wizard to help novice to use it. You can choose a size in pixels for your export and give some others parameters.

    * http://sourceforge.net/projects/inkscapebatch/

Does anyone know how to use this. There isn't an obvious app icon in the downloaded files (always assuming they work on OSX).

Revision history for this message
su_v (suv-lp) said :
#4

> Probably the answer is to use"
> InkscapeBatch

System requirements:
- Microsoft Windows XP, Vista oder 7
- .Net Framework 3.5

> (always assuming they work on OSX)

You never even mentioned which operation system you use… AFAIK there is no such application with a GUI available to batch export SVG files with Inkscape to PNGs for Mac OS X.

You could write a shell script for batch export as indicated by pbhj, however using inkscape-bin from inside the bundled osx application (Inkscape.app) in a shell script (bash or sh) is not as straight forward as on linux (bug #181639).

Revision history for this message
su_v (suv-lp) said :
#5

I don't know how far in progress your project is (all files already done, or still in planning stage?), but maybe for this or your next project (animation) this extension might be of interest to you (I haven't tested the latest available version on Mac OS X myself) - it is based on having drawn all frames within the same file on separate layers, and offers to batch-export the frames to series of image files:

Frame by frame animation extension in development:
<http://www.inkscapeforum.com/viewtopic.php?f=11&t=6019&p=25434>
inkscape-animation-extension - Project Hosting on Google Code:
<https://code.google.com/p/inkscape-animation-extension/>

Revision history for this message
Stephen Taylor (dusk) said :
#6

Thanks for the info.

Yes, my animations are done. I had thought of layers, but in 1 of the cartoons there would have to be >100 so I'm not sure how practical that would be.

Batch exporting does seem like an obvious function to include in Inkscape. But I'm not complaining, it's an excellent app!

Thanks,
Stephen