在多个图像上应用合并图层而不丢失图层
我的问题: 我想制作很多仅在三个文本层上有所不同的图像。我已经弄清楚如何使用 Python-Fu 控制台更改文本。我的下一步是将此文本更改代码放入循环中并添加 png.file-save-png(...)
来保存图片。为了保存为 PNG,我必须合并所有图层(对于每个图像),这对于 single_layer = pdb.gimp-image-merge-visible-layers(image,0)
来说没有问题。为了从这里继续工作,我需要撤消,以恢复我的旧图层。
我是否需要从脚本在 GIMP 中应用 UNDO 操作?
我找不到有关此功能的任何提示。也许有人知道如何做到这一点,或者有解决方法。
My problem:
I want to make a lot of images that differ only in three text layers. I have already figured out, how to make the text changes with the Python-Fu Console. My next step is to put this text change code into a loop and add a png.file-save-png(...)
to save the picture. In order to save as a PNG I have to merge all my layers (for each image), which is no problem with single_layer = pdb.gimp-image-merge-visible-layers(image,0)
. In order to keep working from here, I would need to to an undo, to get my old layers back.
Do I need to apply an UNDO Operation in GIMP from a script?
I couldn't find any hint on this feature. Maybe anyone knows how to do this, or has a workaround.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
经过一夜的睡眠后,我找到了一个解决方法:
我重新打开循环中每张卡片的基本图像文件,其中所有图层和文本图层保持不变。这使我不需要撤消。
顺便说一句,这是我创建 4 * 13 扑克牌的脚本(来自自己的 base_card.xcf):
After a night of sleep, I figured out a workaround:
I reopened the base image file for each card in the loop, where all layers and text layers stayed intact. That prevented me from needing the undo.
By the way, here is my script for creating 4 * 13 playing cards (from ones own base_card.xcf):