繁体   English   中英

Photoshop:使用 python 将图层从一个文件复制到另一个文件

[英]Photoshop: copy a layer from one file to another with python

我有两个 psd 文件,一个带有背景,另一个带有内容。 是否可以使用 python 将背景层复制到另一个(内容)文件?

我想用 python 自动化这个过程。

谢谢

设法用 GIMP 脚本解决这个问题。 一个例子:

# read in
content = pdb.gimp_file_load("content.psd", "")
gimp.Display(content)
background = pdb.gimp_file_load("background.psd", "")
gimp.Display(background)

# add image to new background file
new_layer = pdb.gimp_layer_new_from_drawable(content.layers[0], background) # assuming first layer is what we want here.
background.add_layer(new_layer)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM