pythongimpgaussianblurhighpass-filter

How to apply a high pass filter in GIMP using a python plug-in? And gaussian blur?


How to apply the high-pass filter in a Python plug-in for GIMP? There is no high-pass filter in the procedure browser, and gegl:high-pass does nothing.

Similarly, how to apply gaussian blur?


Solution

  • Gauss is now a gegl filter and those go like this:
    HighPass should work similarly.

    gauss = Gimp.DrawableFilter.new(the_drawable, "gegl:gaussian-blur", "")
    filter_config = gauss.get_config()
    filter_config.set_property('std-dev-x', 5)
    filter_config.set_property('std-dev-y', 5)
    the_drawable.append_filter(gauss)
    # the_drawable.merge_filter(gauss)
    

    Parameters can be found here:
    https://gegl.org/operations/gegl-gaussian-blur.html