Photoshop自定义形状到SVG路径字符串 [英] Photoshop Custom Shape to SVG path string
问题描述
有什么方法可以从Photoshop自定义形状或路径中获取SVG路径字符串吗?还是有另一种获取/构造相似数据的方法?我正在寻找类似的方法:
Is there any way to get the SVG path string off a Photoshop custom shape or path? Or is there another way to get/construct similar data? I'm looking to do something similar to this:
推荐答案
更新:在最新版本的Photoshop中,有一个内置选项可将图像导出为SVG,在路径和自定义形状.只要做:
Update: in recent versions of Photoshop, there is a built-in option to export the image as SVG, which works well on paths and custom shapes. Just do:
文件->导出->导出为...,然后在文件设置中选择SVG.
File -> Export -> Export as... and select SVG in the file settings.
原始答案:
从Photoshop CC 14.2开始,您可以直接从Photoshop创建SVG文件:
Starting from Photoshop CC 14.2, you can create SVG files directly from Photoshop:
- 在用户主文件夹中创建一个名为
generator.json
的文件,其内容如下. - 重新启动Photoshop并打开您的PSD文件.
- 激活生成器:文件">生成">图像资产".
- 将图层重命名为
<something>.svg
. - 该svg文件将在PSD文件旁边的资产目录中创建.
- Create a file named
generator.json
with the content below in your user home folder. - Restart Photoshop and open your PSD file.
- Activate the generator: File > Generate > Image Assets.
- Rename your layer to
<something>.svg
. - The svg file will be created in the assets directory next to your PSD file.
generator.json的内容:
Content for generator.json:
{
"generator-assets": {
"svg-enabled": true
}
}
来源: http://creativedroplets.com/generate-svg-with -photoshop-cc-beta/
这篇关于Photoshop自定义形状到SVG路径字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!