Page 1 of 1
Split the layers of an SVG into individual PNG files?
Posted: 2014-02-12T10:14:51-07:00
by Jduke
Hi all;
Is there a way to split out the layers of my SVG file into multiple .PNG files?
Thanks in advance!
JDuke
Re: Split the layers of an SVG into individual PNG files?
Posted: 2014-02-12T10:20:36-07:00
by snibgo
Yes, with a text editor. Ideally one that understand XML syntax.
Re: Split the layers of an SVG into individual PNG files?
Posted: 2014-02-12T12:40:46-07:00
by Jduke
Is there a way to do this using ImageMagick? Or any other tool?
Re: Split the layers of an SVG into individual PNG files?
Posted: 2014-02-12T22:55:40-07:00
by snibgo
It depends on exactly what you want to do. IM can create a PNG from an SVG, but you would want to split out the different layers first. For a one-off job, Inkscape or an interactive text editor are the obvious choices. If you have many SVG files to process, a script could do the job, with sed or similar. If I was doing it, I might write a custom program using my XML library.
ImageMagick can rasterise the SVG (convert it to pixels). Depending on the SVG, maybe the layers correspond to channels or something, but probably not.
If you have a sample file and it is quite small, you can paste the contents here between [ code ] and [ /code] tags. If it is large, you can put it somewhere like dropbox.com and paste the URL here.