Advertisement


Photoshop layers into SVG paths


Question

I have a set of Photoshop files which consist of a base image with a series of layers with colored overlays. The overlays are labeled using the layer names.

My task is to get these overlays as SVG paths, somehow preserving the labels. (If I can preserve the fill colors as well, that would be cool, but we can define arbitrary fill colors if needed.)

So far we have tried exporting the layers as Illustrator paths, and then exporting to SVG from Illustrator. This gets us reasonable SVG paths, but (a) we lose the labels, and (b) if a layer has more than one discrete section in its overlay, it is separated into several paths.

Is there a way to get these layers into SVG while retaining the labels? Or should we do our Export > Illustrator > SVG route on a layer-by-layer basis?

We're working with CS5, if that's important.

ETA to answerers: We've long since finished this project and delivered the job, so I can't accept an answer, but feel free to pitch in your potential solutions for others.

2016/11/08
1
7
11/8/2016 3:42:00 PM

I wrote a free PS script that lets you do this automatically. Just name the PS layers you want to export with'.svg' at the end and they will be converted to SVGs, keeping the colors. the file name will also be the name of the layer. http://hackingui.com/design/export-photoshop-layer-to-svg/

The script works with CS5, CS6 and CC disclosure: this links to my site

2013/12/16
3
12/16/2013 12:25:00 AM