Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

PSD to SVG converter based on psd-tools2 and svgwrite.

PyPI Version Build Status

Install

Use pip to install:

pip install psd2svg

To use AWS S3 storage backend:

pip install boto3

Usage

The package comes with a command-line tool:

psd2svg input.psd output.svg

When the output path is a directory, or omitted, the tool infers the output name from the input:

psd2svg input.psd output/  # => output/input.svg
psd2svg input.psd          # => input.svg

When --export-resource flag is specified, all png resources are exported to the path specified by --resource-prefix:

psd2svg input.psd output.svg --export-resource
# => output.svg, xxx1.png, ...

psd2svg input.psd output/ --export-resource
# => output/input.svg, output/xxx1.png, ...

psd2svg input.psd output/ --export-resource --resource-prefix=resources/
# => output/input.svg, output/resources/xxx1.png, ...

psd2svg input.psd svg/ --export-resource --resource-prefix=../png/
# => svg/input.svg, png/xxx1.png, ...

To render text in vector stroke:

psd2svg input.psd output/ --text-mode text

The tool can specify URL instead of file path (S3 requires boto3):

psd2svg http://example.com/input.psd
psd2svg s3://bucketname/path/to/input.psd s3://bucketname/path/to/output/

API

The package contains high-level conversion function psd2svg:

from psd2svg import psd2svg

psd2svg('path/to/input.psd', 'path/to/output/')

Test

Invoke tox:

tox

Notes

  • SVG 1.1 does not cover all the blending modes in Photoshop (e.g., linear-dodge)

  • Filter effects are approximation. Some effects are not implemented.

  • Most of adjustments layers are not implemented.

  • Smart object filters are not implemented.

  • Browser support: SVG rendering quality greatly differs depending on the browser. Chrome tends to be the best quality.

  • APIs of this tool is NOT thread-safe.

Metadata

Release files for psd2svg 0.1.0a7.post1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for psd2svg 0.1.0a7.post1
File Size Uploaded
psd2svg-0.1.0a7.post1.tar.gz 18.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for psd2svg 0.1.0a7.post1
File Interpreter ABI Platform
psd2svg-0.1.0a7.post1-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 43.2 kB

Release files / psd2svg-0.1.0a7.post1.tar.gz

Download URL psd2svg-0.1.0a7.post1.tar.gz
Size 18.7 kB
Tags Source
SHA-256 checksum
How to use checksums
8933b170a105e885de50877209a0f3260396e7ddc678c13bbfc74f1a4763c39f
BLAKE2b-256 checksum
How to use checksums
23753886788651dadee23006c62bc5462dbbe23d4adcbe621e88020cbd7ef113
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / psd2svg-0.1.0a7.post1-py2.py3-none-any.whl

Download URL psd2svg-0.1.0a7.post1-py2.py3-none-any.whl
Size 24.6 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
64ee983a912688d85453af569347f340f7a02ab34de2b990720299b387d4f396
BLAKE2b-256 checksum
How to use checksums
68cb5a44f56ca8d93c39bce09c073d09f087c77d0180513cba6637ccbec52a03
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

0.13.0

1 release file

0.12.1

1 release file

0.12.0

1 release file

0.11.0

1 release file

0.10.1

1 release file

0.10.0

1 release file

0.9.0

1 release file

0.8.0

1 release file

0.7.1

1 release file

0.7.0

1 release file

0.6.0

1 release file

0.5.0

1 release file

0.4.0

1 release file

0.3.0

1 release file

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.8

1 release file

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page