我已将以下 python 脚本添加到/usr/lib/gimp/2.0/plug-ins文件夹
#!/usr/bin/python
from gimpfu import *
def scale(imageName):
pass
register(
"my",
"",
"",
"",
"",
"2017",
"<Image>/Image/Hi..",
"RGB*, GRAY*",
[(PF_STRING, 'file_name', 'file_name', 'logo.png')],
[],
scale)
main()
通过运行它
gimp --no-interface -b '(python-fu-my RUN-NONINTERACTIVE "logo.png")' -b '(gimp-quit 0)'
返回
批处理命令遇到执行错误:错误:(:1)python-fu-my 的参数数量无效(预期为 4,但收到 2)
在 Gimp 的程序浏览器中确实有 4 个参数,但如果程序是通过命令行运行的,它不应该期望它们,不是吗?
我跟着文档。怎么了?