psd.js icon indicating copy to clipboard operation
psd.js copied to clipboard

Is there a way to extract SVG or vector paths from a layer or "smart object"

Open pleaseshutup opened this issue 7 years ago • 4 comments

Searching through the repo/issues for vector or svg does not produce much. Just wondering if this is possible and if so, possibly some examples on how to do it.

pleaseshutup avatar May 30 '17 15:05 pleaseshutup

As far as ive tried, getting a direct SVG path is not possible at this point.

I did however solve this partially by using a module like raphael and always assuming the SVG is a solid shape. This might not be a great solution, but it would be something you could do for now.

@meltingice maybe this is something interesting to implement in the newer version you are currently working on ? I will also check if PSD.rb has this so i can get a bit of a grasp if this is even feasible to do

fabulousduck avatar Jul 12 '17 09:07 fabulousduck

@meltingice, I am working in converting the psd to json for fabric js, and using psd js in node and able to extract images, text layer data. Can we extract vector paths from PSD shape layer?

kpomservices avatar Apr 23 '20 12:04 kpomservices

@meltingice,我正在将Fabric js的psd转换为json,并在节点中使用psd js并能够提取图像,文本层数据。我们可以从PSD形状图层中提取矢量路径吗?

paths = node.get('vectorMask').export();

qgh870045127 avatar Aug 29 '20 09:08 qgh870045127

@meltingice,我正在将Fabric js的psd转换为json,并在节点中使用psd js并能够提取图像,文本层数据。我们可以从PSD形状图层中提取矢量路径吗?

paths = node.get('vectorMask').export(); node can't get('vectorMask'). Dose it work ? Can you help me to solve this issue

HaiNV266 avatar Feb 25 '22 03:02 HaiNV266