【问题标题】:Gaussian blur script in GIMPGIMP中的高斯模糊脚本
【发布时间】:2018-10-30 15:08:50
【问题描述】:

我是 GIMP 和脚本的新手。我想知道如何使用脚本对图层应用高斯模糊。我找不到任何简单的例子来描述我的要求。我正在使用 GIMP 版本 2.10.4。请让我知道如何为图层应用高斯模糊。谢谢。

(let*   (
(newimage (car (gimp-image-new 192 192 0)))
(newlayer (car (gimp-file-load-layer 0 newimage "D:\\t.png")))
(clayer (car (gimp-layer-copy newlayer 1)))
)
(gimp-image-add-layer newimage newlayer 0)
(gimp-image-select-color newimage CHANNEL-OP-REPLACE newlayer '(0 0 0))
(gimp-context-set-foreground '(9 77.9 95.3))
(gimp-edit-fill newlayer FOREGROUND-FILL)


(gimp-image-add-layer newimage clayer 0)
(gimp-image-select-color newimage CHANNEL-OP-REPLACE clayer '(0 0 0))
(gimp-context-set-foreground '(255 255 255))
(gimp-edit-fill clayer FOREGROUND-FILL)

/// 
here I want to apply Gaussian blur. I couldn't find the script command for it.

//////

(gimp-selection-none newimage)
(gimp-display-new newimage)

【问题讨论】:

  • 可能是题外话,因为有更好的 Stack Exchange 站点可以解决这个问题,但您至少需要展示您尝试过的内容。 如果 script-fu 编码是主题,那么请展示您的研究(“gimp script gaussian blur”会产生大量信息,包括教程)和您的代码,并告诉我们哪些不适合您。
  • 我已经搜索过,但找不到任何插件或脚本示例
  • SO 是关于询问编码问题,但您的问题似乎是“告诉我如何编写脚本脚本”,这不是主题。要么展示你尝试过的东西,同时解释什么不起作用,或者退后一步,访问一些教程,以了解你想要解决的问题。
  • 我已附上我的脚本代码

标签: gimp script-fu


【解决方案1】:

所有 Gimp API 都记录在 Gimp 本身中。转到Filters>Script-fu>Console...,然后点击Browse... 按钮。这将打开一个对话框,其中列出了左侧的所有功能,并在右侧给出了所选功能的描述。

使用顶部的搜索栏将 API 列表限制为潜在候选人(blurgauss

点击[Apply] 将所选函数的原型复制到控制台窗口。

两个警告:

  • 工具和 API 函数之间没有一对一的关系
  • 在 Gimp 2.10 中,大多数 GEGL 工具(尤其是那些引入新功能的工具)暂时没有等效的 API。

【讨论】:

    猜你喜欢
    • 2018-01-11
    • 1970-01-01
    • 1970-01-01
    • 2018-05-01
    • 1970-01-01
    • 2015-11-05
    • 1970-01-01
    • 2016-04-30
    • 2011-12-07
    相关资源
    最近更新 更多