Git Product home page Git Product logo

photoshop-paths-to-svg's Introduction

Converting Photoshop paths to SVG

Grab the file here:

pathtosvg.jsx

This is a photoshop "jsx" script that turns all paths in the active document into a single SVG file for use in something else. Simply download the script to "somewhere", then run it through file โ†’ scripts โ†’ browse, find the script and open it.

screenshot 197

This will immediately run the conversion and prompt you with a save dialog

screenshot 201

Type a filename - if you already have a file name with that name, you'll be asked whether you want to overwrite that file:

screenshot 202

Once you accept, Photoshop will save the paths to SVG and inform you it finished:

screenshot 203

We can then open the SVG in whatever target application we need. For instance, Inkscape:

screenshot 200

photoshop-paths-to-svg's People

Contributors

pomax avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

photoshop-paths-to-svg's Issues

images

execution:

screenshot 197

After triggering:

screenshot 198

Pasted:

screenshot 199

Inkscape

screenshot 200


Pick a file

257d7a1c-e6f3-11e5-96c7-acb5f5fb14b8

3b262d96-e6f3-11e5-8ef7-0315e989c0aa

screenshot 203

Incomplete path export

Not sure if you intend to maintain this tool or not, but in case you do, I think I found a bug.

I was trying to use your script to grab this following path in .svg because PS's export function simply gives an <image> tag and no path.

Screencap-001-20200313-182739

I ran the script and there were no errors thrown, but the svg I got was incomplete:

Screencap-001-20200313-183017

I suspect it's because I constructed the several parallelograms on the top right using two big beizer curves to form a big 'curly parallelogram' first, then split it into the smaller ones with horizontal line segments. And perhaps PS stores this kind of path differently, and your script missed this edge case. Anyways, those are my educated guesses. Here are my .psd and .svg files if you want them for debugging. Thanks.

files.zip

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.