Can I apply the Threshold filter non-destructively using Python?

Hi,
As shown below, from the GIMP3 UI, it seems that the Threshold filter can be applied non-destructively to a layer.

However, from the Python script, it seems that the Threshold filter cannot be applied non-destructively. When I set up a threshold filter with “gegl:threshold” and tried to apply it non-destructively to a layer with the following code, it failed.

self.layers[0].append_filter(self.threshold_filter)

Only the following code which apply the filter destructively was accepted.

self.layers[0].merge_filter(self.threshold_filter)

I suppose there is another non-destructive GEGL threshold filter other than the existing “gegl:threshold” filter, but I can’t find it.

Does anyone know of any?

You can use the Gegl filter browser that Batcher includes.

Indeed gegl:threshold will fail:

but Local Threshold and Threshold Alpha 2 YES.

1 Like

GIMP has its own Threshold filter, “gimp:threshold”. You would need to use that one if you want to be able to apply it non-destructively.

1 Like

Where are these Gimp-only filters documented?

I’m not sure if we specifically document them anywhere at the moment, but searching for “gimp:” in the filter-actions code will show them all.

1 Like

Thank you! I’ will try it later.

Thank you!

1 Like

Thanks for your information, but I can’t find any information about the property names these GIMP filters have. How can I get this information?