TsXor
TsXor
BRUH THIS EXAMPLE IS WRONG! ```python with Session(action="new_document") as ps: desc = ps.ActionDescriptor #
Well, it still won't work after you add the missing `()` because it lacks other parameters. I'll include a working example in my PR.
> BRUH THIS EXAMPLE IS WRONG! > > ```python > with Session(action="new_document") as ps: > desc = ps.ActionDescriptor # desc.putPath(ps.app.charIDToTypeID("null"), "your/image/path.jpg") > event_id = ps.app.charIDToTypeID("Plc ") # `Plc` need one...
It is often when there is an "error in photoshop-side" in your code that COMError emerges. For example, when you use `executeActionGet` but the ActionReference you use matches no object,...
> @TsXor No, as you can see from the error message, it is because of system language. It is just error message. On system with Chinsese language, it will show...
> @TsXor As I wrote, I tested it with the examples of the project: https://loonghao.github.io/photoshop-python-api/examples/#eval-javascript So it should be good. Then we should find where is wrong. Try that js....
Also, did ps alert anything?
单凭ps api可能有点想不到,但是我们可以借助另一个模块:[psd-tools](https://pypi.org/project/psd-tools/) 这是psd-tools的Getting started使用例:(将图层保存为图片) ```python from psd_tools import PSDImage psd = PSDImage.open('example.psd') psd.composite().save('example.png') for layer in psd: print(layer) layer_image = layer.composite() layer_image.save('%s.png' % layer.name) ``` 然后,这是ps api的Import Image As Layer(将图片导入为图层)用例:...
顺便捉个虫:https://loonghao.github.io/photoshop-python-api/examples/#operation-layer-set 标题应为Operate Layer Set 第一行应为"""An example to show you how to operate layerSet."""
> > > > > 单凭ps api可能有点想不到,但是我们可以借助另一个模块:[psd-tools](https://pypi.org/project/psd-tools/) 这是psd-tools的Getting started使用例:(将图层保存为图片) > > ```python > > from psd_tools import PSDImage > > > > psd = PSDImage.open('example.psd') > > psd.composite().save('example.png') > >...